Fixed REST path and param constants
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@131450 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
629207e097
commit
328f8ad8a4
|
@ -79,7 +79,7 @@ public class ContextManager {
|
|||
@POST
|
||||
@Path(ContextPath.RENAME_PATH_PART + "/{" + ID_PATH_PARAM + "}")
|
||||
public String rename(@PathParam(ID_PATH_PARAM) String uuid,
|
||||
@QueryParam("name") String name) throws ContextNotFoundException,
|
||||
@QueryParam(ContextPath.NAME_PARAM) String name) throws ContextNotFoundException,
|
||||
ContextException {
|
||||
logger.trace("requested to rename context id {} with {} ", uuid, name);
|
||||
return contextManager.rename(uuid, name);
|
||||
|
|
|
@ -34,8 +34,7 @@ public class EntityManager {
|
|||
public static final String SOURCE_ID_PATH_PARAM = "sourceId";
|
||||
public static final String TARGET_ID_PATH_PARAM = "targetId";
|
||||
|
||||
public static final String TYPE_PARAM = "type";
|
||||
public static final String PROPERTIES_PARAM = "properties";
|
||||
|
||||
|
||||
protected EntityManagement entityManager = new EntityManagementImpl();
|
||||
|
||||
|
@ -143,7 +142,7 @@ public class EntityManager {
|
|||
* @throws ResourceRegistryException
|
||||
*/
|
||||
@PUT
|
||||
@Path(EntityPath.CONSIST_OF_PATH_PART + "/"
|
||||
@Path(EntityPath.CONSISTS_OF_PATH_PART + "/"
|
||||
+ EntityPath.SOURCE_PATH_PART + "/{"
|
||||
+ SOURCE_ID_PATH_PARAM + "}/"
|
||||
+ EntityPath.TARGET_PATH_PART + "/{"
|
||||
|
@ -151,8 +150,8 @@ public class EntityManager {
|
|||
public String attachFacet(
|
||||
@PathParam(SOURCE_ID_PATH_PARAM) String resourceUUID,
|
||||
@PathParam(TARGET_ID_PATH_PARAM) String facetUUID,
|
||||
@QueryParam(TYPE_PARAM) String type,
|
||||
@QueryParam(PROPERTIES_PARAM) String properties)
|
||||
@QueryParam(EntityPath.TYPE_PARAM) String type,
|
||||
@QueryParam(EntityPath.PROPERTIES_PARAM) String properties)
|
||||
throws FacetNotFoundException, ResourceNotFoundException,
|
||||
ResourceRegistryException {
|
||||
logger.trace(
|
||||
|
@ -170,7 +169,7 @@ public class EntityManager {
|
|||
* @throws ResourceRegistryException
|
||||
*/
|
||||
@DELETE
|
||||
@Path(EntityPath.CONSIST_OF_PATH_PART + "/{" + ID_PATH_PARAM
|
||||
@Path(EntityPath.CONSISTS_OF_PATH_PART + "/{" + ID_PATH_PARAM
|
||||
+ "}")
|
||||
public boolean detachFacet(@PathParam(ID_PATH_PARAM) String consistOfUUID)
|
||||
throws ResourceRegistryException {
|
||||
|
@ -189,7 +188,7 @@ public class EntityManager {
|
|||
* @throws ResourceRegistryException
|
||||
*/
|
||||
@PUT
|
||||
@Path(EntityPath.RELATED_TO_PATH_PART + "/"
|
||||
@Path(EntityPath.IS_RELATED_TO_PATH_PART + "/"
|
||||
+ EntityPath.SOURCE_PATH_PART + "/{"
|
||||
+ SOURCE_ID_PATH_PARAM + "}/"
|
||||
+ EntityPath.TARGET_PATH_PART + "/{"
|
||||
|
@ -197,8 +196,8 @@ public class EntityManager {
|
|||
public String attachResource(
|
||||
@PathParam(SOURCE_ID_PATH_PARAM) String sourceResourceUUID,
|
||||
@PathParam(TARGET_ID_PATH_PARAM) String targetResourceUUID,
|
||||
@QueryParam(TYPE_PARAM) String type,
|
||||
@QueryParam(PROPERTIES_PARAM) String properties)
|
||||
@QueryParam(EntityPath.TYPE_PARAM) String type,
|
||||
@QueryParam(EntityPath.PROPERTIES_PARAM) String properties)
|
||||
throws ResourceNotFoundException, ResourceRegistryException {
|
||||
logger.trace(
|
||||
"requested to attach source resource {} and target resource {} ({} Type {}) with properties {}",
|
||||
|
@ -215,7 +214,7 @@ public class EntityManager {
|
|||
* @throws ResourceRegistryException
|
||||
*/
|
||||
@DELETE
|
||||
@Path(EntityPath.RELATED_TO_PATH_PART + "/{" + ID_PATH_PARAM
|
||||
@Path(EntityPath.IS_RELATED_TO_PATH_PART + "/{" + ID_PATH_PARAM
|
||||
+ "}")
|
||||
public boolean detachResource(@PathParam(ID_PATH_PARAM) String relatedToUUID)
|
||||
throws ResourceRegistryException {
|
||||
|
|
Loading…
Reference in New Issue