Package org.duracloud.durastore.rest
Class SpaceResource
- java.lang.Object
-
- org.duracloud.durastore.rest.SpaceResource
-
public class SpaceResource extends Object
Provides interaction with spaces- Author:
- Bill Branan
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description SpaceResource(StorageProviderFactory storageProviderFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSpace(String spaceID, Map<String,AclType> userACLs, String storeID)Adds a space.voiddeleteSpace(String spaceID, String storeID)Deletes a space, removing all included content.Map<String,AclType>getSpaceACLs(String spaceID, String storeID)Gets the ACLs of a space.StringgetSpaceContents(String spaceID, String storeID, String prefix, long maxResults, String marker)Gets a listing of the contents of a space.Map<String,String>getSpaceProperties(String spaceID, String storeID)Gets the properties of a space.StringgetSpaces(String storeID)Provides a listing of all spaces for a customer.voidupdateSpaceACLs(String spaceID, Map<String,AclType> spaceACLs, String storeID)Updates the ACLs of a space.
-
-
-
Constructor Detail
-
SpaceResource
public SpaceResource(StorageProviderFactory storageProviderFactory)
-
-
Method Detail
-
getSpaces
public String getSpaces(String storeID) throws ResourceException
Provides a listing of all spaces for a customer. Open spaces are always included in the list, closed spaces are included based on user authorization.- Parameters:
storeID-- Returns:
- XML listing of spaces
- Throws:
ResourceException
-
getSpaceProperties
public Map<String,String> getSpaceProperties(String spaceID, String storeID) throws ResourceException
Gets the properties of a space.- Parameters:
spaceID-storeID-- Returns:
- Map of space properties
- Throws:
ResourceException
-
getSpaceACLs
public Map<String,AclType> getSpaceACLs(String spaceID, String storeID) throws ResourceException
Gets the ACLs of a space.- Parameters:
spaceID-storeID-- Returns:
- Map of space ACLs
- Throws:
ResourceException
-
getSpaceContents
public String getSpaceContents(String spaceID, String storeID, String prefix, long maxResults, String marker) throws ResourceException
Gets a listing of the contents of a space.- Parameters:
spaceID-storeID-prefix-maxResults-marker-- Returns:
- XML listing of space contents
- Throws:
ResourceException
-
addSpace
public void addSpace(String spaceID, Map<String,AclType> userACLs, String storeID) throws ResourceException, InvalidIdException
Adds a space.- Parameters:
spaceID-storeID-- Throws:
ResourceExceptionInvalidIdException
-
updateSpaceACLs
public void updateSpaceACLs(String spaceID, Map<String,AclType> spaceACLs, String storeID) throws ResourceException
Updates the ACLs of a space.- Parameters:
spaceID-spaceACLs-storeID-- Throws:
ResourceException
-
deleteSpace
public void deleteSpace(String spaceID, String storeID) throws ResourceException
Deletes a space, removing all included content.- Parameters:
spaceID-storeID-- Throws:
ResourceException
-
-