Fixed access method
This commit is contained in:
parent
0565146a91
commit
251d239773
|
@ -4,7 +4,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
|
||||||
import javax.ws.rs.DefaultValue;
|
import javax.ws.rs.DefaultValue;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.HEAD;
|
import javax.ws.rs.HEAD;
|
||||||
|
@ -13,7 +12,6 @@ import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.QueryParam;
|
import javax.ws.rs.QueryParam;
|
||||||
import javax.ws.rs.core.Context;
|
import javax.ws.rs.core.Context;
|
||||||
import javax.ws.rs.core.MediaType;
|
|
||||||
import javax.ws.rs.core.MultivaluedMap;
|
import javax.ws.rs.core.MultivaluedMap;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.Response.Status;
|
import javax.ws.rs.core.Response.Status;
|
||||||
|
@ -116,7 +114,6 @@ public class Access extends BaseRest {
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(AccessPath.CONTEXTS_PATH_PART + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
@Path(AccessPath.CONTEXTS_PATH_PART + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public String getContext(@PathParam(AccessPath.UUID_PATH_PARAM) String uuid)
|
public String getContext(@PathParam(AccessPath.UUID_PATH_PARAM) String uuid)
|
||||||
throws ContextNotFoundException, ResourceRegistryException {
|
throws ContextNotFoundException, ResourceRegistryException {
|
||||||
|
@ -144,7 +141,6 @@ public class Access extends BaseRest {
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(AccessPath.TYPES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}")
|
@Path(AccessPath.TYPES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}")
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public String getType(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
public String getType(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
||||||
@QueryParam(AccessPath.POLYMORPHIC_PARAM) @DefaultValue("false") Boolean polymorphic)
|
@QueryParam(AccessPath.POLYMORPHIC_PARAM) @DefaultValue("false") Boolean polymorphic)
|
||||||
|
@ -172,7 +168,6 @@ public class Access extends BaseRest {
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}")
|
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}")
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public String getAllInstances(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
public String getAllInstances(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
||||||
@QueryParam(AccessPath.POLYMORPHIC_PARAM) @DefaultValue("true") Boolean polymorphic)
|
@QueryParam(AccessPath.POLYMORPHIC_PARAM) @DefaultValue("true") Boolean polymorphic)
|
||||||
|
@ -202,7 +197,6 @@ public class Access extends BaseRest {
|
||||||
*/
|
*/
|
||||||
@HEAD
|
@HEAD
|
||||||
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public Response instanceExists(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
public Response instanceExists(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
||||||
@PathParam(AccessPath.UUID_PATH_PARAM) String uuid) throws NotFoundException, ResourceRegistryException {
|
@PathParam(AccessPath.UUID_PATH_PARAM) String uuid) throws NotFoundException, ResourceRegistryException {
|
||||||
|
@ -247,7 +241,6 @@ public class Access extends BaseRest {
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public String getInstance(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
public String getInstance(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
||||||
@PathParam(AccessPath.UUID_PATH_PARAM) String uuid) throws NotFoundException, ResourceRegistryException {
|
@PathParam(AccessPath.UUID_PATH_PARAM) String uuid) throws NotFoundException, ResourceRegistryException {
|
||||||
|
@ -280,8 +273,7 @@ public class Access extends BaseRest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}")
|
@Path(AccessPath.INSTANCES_PATH_PART + "/{" + AccessPath.TYPE_PATH_PARAM + "}" + "/{" + AccessPath.UUID_PATH_PARAM + "}/" + AccessPath.CONTEXTS_PATH_PART)
|
||||||
@Consumes({MediaType.TEXT_PLAIN, ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8})
|
|
||||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
public String getInstanceContexts(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
public String getInstanceContexts(@PathParam(AccessPath.TYPE_PATH_PARAM) String type,
|
||||||
@PathParam(AccessPath.UUID_PATH_PARAM) String instanceId) throws NotFoundException, ResourceRegistryException {
|
@PathParam(AccessPath.UUID_PATH_PARAM) String instanceId) throws NotFoundException, ResourceRegistryException {
|
||||||
|
|
Loading…
Reference in New Issue