Improving documentation
This commit is contained in:
parent
7e0c035647
commit
e86e9d0581
|
@ -198,16 +198,16 @@ The VRE Manager can only assign roles.
|
||||||
|
|
||||||
The catalogue uses the following hierarchic roles:
|
The catalogue uses the following hierarchic roles:
|
||||||
|
|
||||||
Catalogue-Member:
|
**Catalogue-Member**:
|
||||||
A user with such a role is mainly capable of listing and reading items;
|
A user with such a role is mainly capable of listing and reading items;
|
||||||
|
|
||||||
Catalogue-Editor:
|
**Catalogue-Editor**:
|
||||||
A user with such a role is capable of managing the items he/she creates and capable of using other safe APIs;
|
A user with such a role is capable of managing the items he/she creates and capable of using other safe APIs;
|
||||||
|
|
||||||
Catalogue-Admin:
|
**Catalogue-Admin**:
|
||||||
A user with such a role is capable of administrating many aspects of the catalogue;
|
A user with such a role is capable of administrating many aspects of the catalogue;
|
||||||
|
|
||||||
Catalogue-Manager:
|
**Catalogue-Manager**:
|
||||||
A user with such a role can use all the APIs exposed by the service except item moderation APIs (e.g. approve, reject, ...).
|
A user with such a role can use all the APIs exposed by the service except item moderation APIs (e.g. approve, reject, ...).
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,18 +225,18 @@ Moderated Catalogues
|
||||||
|
|
||||||
|
|
||||||
Any catalogues can be declared as moderated.
|
Any catalogues can be declared as moderated.
|
||||||
This means that, a Catalogue-Moderator must approve any submitted items to make them available to the other users of the catalogue.
|
This means that, a **Catalogue-Moderator** must approve any submitted items to make them available to the other users of the catalogue.
|
||||||
|
|
||||||
In a moderated catalogue, an item can be in the following states:
|
In a moderated catalogue, an item can be in the following states:
|
||||||
|
|
||||||
pending:
|
**pending**:
|
||||||
The item published by any allowed author (a Catalogue-Editor or above) but not available to the other users of the catalogue.
|
The item published by any allowed author (a Catalogue-Editor or above) but not available to the other users of the catalogue.
|
||||||
A Catalogue-Moderator has to approve or reject it;
|
A Catalogue-Moderator has to approve or reject it;
|
||||||
|
|
||||||
approved:
|
**approved**:
|
||||||
A Catalogue-Moderator has approved the item published by any allowed users;
|
A Catalogue-Moderator has approved the item published by any allowed users;
|
||||||
|
|
||||||
rejected:
|
**rejected**:
|
||||||
A Catalogue-Moderator has rejected the item published by any allowed users.
|
A Catalogue-Moderator has rejected the item published by any allowed users.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,16 @@ import org.gcube.gcat.persistence.ckan.CKANUserCache;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
||||||
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
|
import com.webcohesion.enunciate.metadata.swagger.OperationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Configuration.CONFIGURATIONS)
|
@Path(Configuration.CONFIGURATIONS)
|
||||||
|
@ResourceLabel("Configuration APIs")
|
||||||
public class Configuration extends BaseREST implements org.gcube.gcat.api.interfaces.Configuration<Response,Response> {
|
public class Configuration extends BaseREST implements org.gcube.gcat.api.interfaces.Configuration<Response,Response> {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(Configuration.class);
|
private static Logger logger = LoggerFactory.getLogger(Configuration.class);
|
||||||
|
@ -423,6 +426,7 @@ public class Configuration extends BaseREST implements org.gcube.gcat.api.interf
|
||||||
@ResponseCode(code = 401, condition = "Only Catalogue-Managers can create/update catalogue configuration."),
|
@ResponseCode(code = 401, condition = "Only Catalogue-Managers can create/update catalogue configuration."),
|
||||||
@ResponseCode(code = 500, condition = "Error while creating/updating catalogue configuration."),
|
@ResponseCode(code = 500, condition = "Error while creating/updating catalogue configuration."),
|
||||||
})
|
})
|
||||||
|
@OperationId("Create or Update")
|
||||||
public String createOrUpdate(@PathParam(CONTEXT_FULLNAME_PARAMETER) String context, String json) throws WebServiceException {
|
public String createOrUpdate(@PathParam(CONTEXT_FULLNAME_PARAMETER) String context, String json) throws WebServiceException {
|
||||||
try {
|
try {
|
||||||
ServiceCatalogueConfiguration catalogueConfiguration = ServiceCatalogueConfiguration.getServiceCatalogueConfiguration(json);
|
ServiceCatalogueConfiguration catalogueConfiguration = ServiceCatalogueConfiguration.getServiceCatalogueConfiguration(json);
|
||||||
|
@ -614,6 +618,7 @@ public class Configuration extends BaseREST implements org.gcube.gcat.api.interf
|
||||||
* @throws WebServiceException
|
* @throws WebServiceException
|
||||||
*
|
*
|
||||||
* @pathExample /configurations/CURRENT_CONTEXT
|
* @pathExample /configurations/CURRENT_CONTEXT
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@PURGE
|
@PURGE
|
||||||
@Path("/{" + CONTEXT_FULLNAME_PARAMETER + "}")
|
@Path("/{" + CONTEXT_FULLNAME_PARAMETER + "}")
|
||||||
|
|
|
@ -21,10 +21,13 @@ import org.gcube.gcat.api.GCatConstants;
|
||||||
//import org.gcube.gcat.api.roles.Role;
|
//import org.gcube.gcat.api.roles.Role;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANGroup;
|
import org.gcube.gcat.persistence.ckan.CKANGroup;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Group.GROUPS)
|
@Path(Group.GROUPS)
|
||||||
|
@ResourceLabel("Group APIs")
|
||||||
public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfaces.Group<Response,Response> {
|
public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfaces.Group<Response,Response> {
|
||||||
|
|
||||||
protected static final String GROUP_ID_PARAMETER = "GROUP_ID";
|
protected static final String GROUP_ID_PARAMETER = "GROUP_ID";
|
||||||
|
|
|
@ -27,6 +27,8 @@ import org.gcube.gcat.persistence.ckan.CKANPackage;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
||||||
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
|
|
||||||
|
@ -34,6 +36,8 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Item.ITEMS)
|
@Path(Item.ITEMS)
|
||||||
|
@ResourceGroup("Item APIs")
|
||||||
|
@ResourceLabel("Item APIs")
|
||||||
public class Item extends REST<CKANPackage> implements org.gcube.gcat.api.interfaces.Item<Response,Response> {
|
public class Item extends REST<CKANPackage> implements org.gcube.gcat.api.interfaces.Item<Response,Response> {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(Item.class);
|
private final Logger logger = LoggerFactory.getLogger(Item.class);
|
||||||
|
|
|
@ -7,10 +7,13 @@ import javax.ws.rs.Produces;
|
||||||
import org.gcube.gcat.api.GCatConstants;
|
import org.gcube.gcat.api.GCatConstants;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANLicense;
|
import org.gcube.gcat.persistence.ckan.CKANLicense;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(License.LICENSES)
|
@Path(License.LICENSES)
|
||||||
|
@ResourceLabel("License APIs")
|
||||||
public class License extends REST<CKANLicense> implements org.gcube.gcat.api.interfaces.License {
|
public class License extends REST<CKANLicense> implements org.gcube.gcat.api.interfaces.License {
|
||||||
|
|
||||||
public License() {
|
public License() {
|
||||||
|
|
|
@ -14,10 +14,13 @@ import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategory;
|
||||||
import org.gcube.gcat.api.GCatConstants;
|
import org.gcube.gcat.api.GCatConstants;
|
||||||
import org.gcube.gcat.profile.MetadataUtility;
|
import org.gcube.gcat.profile.MetadataUtility;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Namespace.NAMESPACES)
|
@Path(Namespace.NAMESPACES)
|
||||||
|
@ResourceLabel("Namespace APIs")
|
||||||
public class Namespace extends BaseREST implements org.gcube.gcat.api.interfaces.Namespace {
|
public class Namespace extends BaseREST implements org.gcube.gcat.api.interfaces.Namespace {
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|
|
@ -31,10 +31,13 @@ import org.gcube.gcat.api.GCatConstants;
|
||||||
import org.gcube.gcat.profile.ISProfile;
|
import org.gcube.gcat.profile.ISProfile;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Profile.PROFILES)
|
@Path(Profile.PROFILES)
|
||||||
|
@ResourceLabel("Profile APIs")
|
||||||
public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.Profile<Response,Response> {
|
public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.Profile<Response,Response> {
|
||||||
|
|
||||||
public static final String PROFILE_NAME_PARAMETER = "PROFILE_NAME";
|
public static final String PROFILE_NAME_PARAMETER = "PROFILE_NAME";
|
||||||
|
|
|
@ -19,10 +19,15 @@ import org.gcube.gcat.api.GCatConstants;
|
||||||
//import org.gcube.gcat.api.roles.Role;
|
//import org.gcube.gcat.api.roles.Role;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANResource;
|
import org.gcube.gcat.persistence.ckan.CKANResource;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Resource.COLLECTION)
|
@Path(Resource.COLLECTION)
|
||||||
|
@ResourceGroup("Item APIs")
|
||||||
|
@ResourceLabel("Item's Resource APIs")
|
||||||
public class Resource extends BaseREST implements org.gcube.gcat.api.interfaces.Resource<Response,Response> {
|
public class Resource extends BaseREST implements org.gcube.gcat.api.interfaces.Resource<Response,Response> {
|
||||||
|
|
||||||
protected static final String ITEM_ID_PARAMETER = Item.ITEM_ID_PARAMETER;
|
protected static final String ITEM_ID_PARAMETER = Item.ITEM_ID_PARAMETER;
|
||||||
|
|
|
@ -17,10 +17,15 @@ import org.gcube.gcat.api.GCatConstants;
|
||||||
//import org.gcube.gcat.api.roles.Role;
|
//import org.gcube.gcat.api.roles.Role;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANPackageTrash;
|
import org.gcube.gcat.persistence.ckan.CKANPackageTrash;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(Trash.TRASH)
|
@Path(Trash.TRASH)
|
||||||
|
@ResourceGroup("Item APIs")
|
||||||
|
@ResourceLabel("Item's Trash APIs")
|
||||||
public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Trash<Response> {
|
public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Trash<Response> {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,13 @@ import org.gcube.gcat.api.roles.Role;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANUser;
|
import org.gcube.gcat.persistence.ckan.CKANUser;
|
||||||
import org.gcube.gcat.persistence.ckan.CKANUserCache;
|
import org.gcube.gcat.persistence.ckan.CKANUserCache;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(User.USERS)
|
@Path(User.USERS)
|
||||||
|
@ResourceLabel("User APIs")
|
||||||
public class User extends REST<CKANUser> implements org.gcube.gcat.api.interfaces.User<Response,Response> {
|
public class User extends REST<CKANUser> implements org.gcube.gcat.api.interfaces.User<Response,Response> {
|
||||||
|
|
||||||
protected static final String GCUBE_USERNAME_PARAMETER = "GCUBE_USERNAME";
|
protected static final String GCUBE_USERNAME_PARAMETER = "GCUBE_USERNAME";
|
||||||
|
|
Loading…
Reference in New Issue