Package org.duracloud.durastore.rest
Class SpaceRest
- java.lang.Object
-
- org.duracloud.durastore.rest.BaseRest
-
- org.duracloud.durastore.rest.SpaceRest
-
@Path("/") @Component public class SpaceRest extends BaseRestProvides interaction with spaces via REST- Author:
- Bill Branan
-
-
Field Summary
-
Fields inherited from class org.duracloud.durastore.rest.BaseRest
APP_NAME, APPLICATION_XML, CONTENT_MIMETYPE_HEADER, COPY_SOURCE_HEADER, COPY_SOURCE_STORE_HEADER, DEFAULT_MIME, HEADER_PREFIX, HTML, RANGE_HEADER, SPACE_ACL_HEADER, TEXT_PLAIN, XML
-
-
Constructor Summary
Constructors Constructor Description SpaceRest(SpaceResource spaceResource, SecurityContextUtil securityContextUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddSpace(String spaceID, String storeID)see SpaceResource.addSpace(String, String, String, String)javax.ws.rs.core.ResponsedeleteSpace(String spaceID, String storeID)see SpaceResource.deleteSpace(String, String);javax.ws.rs.core.ResponsegetSpace(String spaceID, String storeID, String prefix, long maxResults, String marker)see SpaceResource.getSpaceProperties(String, String); see SpaceResource.getSpaceContents(String, String);javax.ws.rs.core.ResponsegetSpaceACLs(String spaceID, String storeID)see SpaceResource.getSpaceACLs(String, String);javax.ws.rs.core.ResponsegetSpaceProperties(String spaceID, String storeID)see SpaceResource.getSpaceProperties(String, String);javax.ws.rs.core.ResponsegetSpaces(String storeID)see SpaceResource.getSpaces()javax.ws.rs.core.ResponseupdateSpaceACLs(String spaceID, String storeID)This method sets the ACLs associated with a space.-
Methods inherited from class org.duracloud.durastore.rest.BaseRest
getAccountId, getSpaceACLs, getSubdomain, getUserProperties, getUserProperties, responseBad, responseBad, responseBad, responseBadRequest, responseNotFound, responseNotFound, responseOk, responseOk, responseOk, responseOkStream, responseOkXml, responseOkXmlStream
-
-
-
-
Constructor Detail
-
SpaceRest
@Autowired public SpaceRest(SpaceResource spaceResource, SecurityContextUtil securityContextUtil)
-
-
Method Detail
-
getSpaces
@Path("/spaces") @GET @Produces("application/xml") public javax.ws.rs.core.Response getSpaces(@QueryParam("storeID") String storeID)see SpaceResource.getSpaces()- Returns:
- 200 response with XML listing of spaces
-
getSpace
@Path("/{spaceID}") @GET @Produces("application/xml") public javax.ws.rs.core.Response getSpace(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID, @QueryParam("prefix") String prefix, @QueryParam("maxResults") long maxResults, @QueryParam("marker") String marker)see SpaceResource.getSpaceProperties(String, String); see SpaceResource.getSpaceContents(String, String);- Returns:
- 200 response with XML listing of space content and space properties included as header values
-
getSpaceProperties
@Path("/{spaceID}") @HEAD public javax.ws.rs.core.Response getSpaceProperties(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID)see SpaceResource.getSpaceProperties(String, String);- Returns:
- 200 response with space properties included as header values
-
getSpaceACLs
@Path("/acl/{spaceID}") @HEAD public javax.ws.rs.core.Response getSpaceACLs(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID)see SpaceResource.getSpaceACLs(String, String);- Returns:
- 200 response with space ACLs included as header values
-
addSpace
@Path("/{spaceID}") @PUT public javax.ws.rs.core.Response addSpace(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID)see SpaceResource.addSpace(String, String, String, String)- Returns:
- 201 response with request URI
-
updateSpaceACLs
@Path("/acl/{spaceID}") @POST public javax.ws.rs.core.Response updateSpaceACLs(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID)This method sets the ACLs associated with a space. Only values included in the ACLs headers will be updated, others will be removed.- Returns:
- 200 response
-
-