Rename Access to Context.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@158636 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2017-11-18 04:46:11 +00:00
parent abbcc67660
commit 3d2aea155e
3 changed files with 9 additions and 9 deletions

View File

@ -6,9 +6,9 @@ package org.gcube.resourcemanagement.manager.io.rs;
* @author Manuele Simi (ISTI - CNR)
*
*/
public class AccessPath {
public class ContextPath {
public static final String ACCESS_PATH_PART = "access";
public static final String ROOT = "context";
public static final String SCHEMA_PATH_PART = "schema";
public static final String POLYMORPHIC_PARAM = "polymorphic";

View File

@ -3,7 +3,7 @@ package org.gcube.resourcemanagement.manager.webapp;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.MediaType;
import org.gcube.resourcemanagement.manager.webapp.rs.Access;
import org.gcube.resourcemanagement.manager.webapp.rs.Context;
import org.glassfish.jersey.server.ResourceConfig;
/**
@ -16,7 +16,7 @@ public class ResourceInitializer extends ResourceConfig {
public ResourceInitializer(){
//where jersey will find the operation's handler
packages(Access.class.getPackage().toString());
packages(Context.class.getPackage().toString());
}
}

View File

@ -17,10 +17,10 @@ import org.slf4j.LoggerFactory;
* @author Manuele Simi (ISTI-CNR)
*
*/
@Path(AccessPath.ACCESS_PATH_PART)
public class Access {
@Path(ContextPath.ROOT)
public class Context {
private static Logger logger = LoggerFactory.getLogger(Access.class);
private static Logger logger = LoggerFactory.getLogger(Context.class);
public static final String ID_PATH_PARAM = "id";
public static final String TYPE_PATH_PARAM = "type";
@ -29,10 +29,10 @@ public class Access {
* e.g. GET /resource-manager/access/schema/ContactFacet?polymorphic=true
*/
@GET
@Path(AccessPath.SCHEMA_PATH_PART + "/{" + TYPE_PATH_PARAM + "}")
@Path(ContextPath.SCHEMA_PATH_PART + "/{" + TYPE_PATH_PARAM + "}")
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
public String voidMethod(@PathParam(TYPE_PATH_PARAM) String type,
@QueryParam(AccessPath.POLYMORPHIC_PARAM) @DefaultValue("false") Boolean polymorphic)
@QueryParam(ContextPath.POLYMORPHIC_PARAM) @DefaultValue("false") Boolean polymorphic)
{
logger.info("Requested Schema for type {}", type);