Package org.duracloud.storage.provider
Class StorageProviderBase
java.lang.Object
org.duracloud.storage.provider.StorageProviderBase
- All Implemented Interfaces:
StorageProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final org.slf4j.LoggerFields inherited from interface org.duracloud.storage.provider.StorageProvider
DEFAULT_MAX_RESULTS, DEFAULT_MIMETYPE, ISO8601_DATE_FORMAT, PROPERTIES_BUCKET, PROPERTIES_CONTENT_CHECKSUM, PROPERTIES_CONTENT_CREATOR, PROPERTIES_CONTENT_FILE_CREATED, PROPERTIES_CONTENT_FILE_LAST_ACCESSED, PROPERTIES_CONTENT_FILE_MODIFIED, PROPERTIES_CONTENT_FILE_PATH, PROPERTIES_CONTENT_MD5, PROPERTIES_CONTENT_MIMETYPE, PROPERTIES_CONTENT_MODIFIED, PROPERTIES_CONTENT_SIZE, PROPERTIES_COPY_SOURCE, PROPERTIES_COPY_SOURCE_STORE, PROPERTIES_HLS_STREAMING_HOST, PROPERTIES_HLS_STREAMING_TYPE, PROPERTIES_SPACE_ACL, PROPERTIES_SPACE_ACL_GROUP, PROPERTIES_SPACE_ACL_PUBLIC, PROPERTIES_SPACE_COUNT, PROPERTIES_SPACE_CREATED, PROPERTIES_SPACE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSpace(String spaceId) Deletes a space.voiddeleteSpaceSync(String spaceId) This method is only intended to be used by tests!protected abstract voiddoSetSpaceProperties(String spaceId, Map<String, String> spaceProps) getAllSpaceProperties(String spaceId) getSpaceACLs(String spaceId) Retrieves the ACLs associated with a space.getSpaceDeleteWorker(String spaceId) getSpaceProperties(String spaceId) This method returns all of the space properties EXCEPT the ACLsremoveCalculatedProperties(Map<String, String> properties) protected abstract voidremoveSpace(String spaceId) voidsetNewSpaceProperties(String spaceId, Map<String, String> spaceProperties) Sets the properties on this space.voidsetNewSpaceProperties(String spaceId, Map<String, String> spaceProperties, Map<String, AclType> spaceACLs) Sets the properties of this space.voidsetSpaceACLs(String spaceId, Map<String, AclType> spaceACLs) Sets the ACLs associated with a space.voidsetWrappedStorageProvider(StorageProvider wrappedStorageProvider) Sets an alternate storage provider that can be used for select operations.protected abstract booleanspaceExists(String spaceId) protected voidthrowIfSpaceNotExist(String spaceId) protected voidthrowIfSpaceNotExist(String spaceId, boolean wait) unpackACLs(Map<String, String> spaceProps) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.duracloud.storage.provider.StorageProvider
addContent, copyContent, createSpace, deleteContent, getContent, getContent, getContentProperties, getSpaceContents, getSpaceContentsChunked, getSpaces, getStorageProviderType, setContentProperties
-
Field Details
-
ACL_USER_READ
- See Also:
-
ACL_USER_WRITE
- See Also:
-
ACL_GROUP_READ
- See Also:
-
ACL_GROUP_WRITE
- See Also:
-
ACL_DELIM
- See Also:
-
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
StorageProviderBase
public StorageProviderBase()
-
-
Method Details
-
spaceExists
-
removeSpace
-
getAllSpaceProperties
-
doSetSpaceProperties
-
getSpaceProperties
This method returns all of the space properties EXCEPT the ACLs- Specified by:
getSpacePropertiesin interfaceStorageProvider- Parameters:
spaceId- - ID of the space- Returns:
- map of space properties
-
setNewSpaceProperties
Sets the properties on this space. Maintains the current ACL settings.- Parameters:
spaceId-spaceProperties-
-
setNewSpaceProperties
public void setNewSpaceProperties(String spaceId, Map<String, String> spaceProperties, Map<String, AclType> spaceACLs) Sets the properties of this space. Note that this method is intentionally not exposed to users, as it is not meant to be used for user properties, but only for system-level properties. The names and values need to be kept short, and the overall number of properties needs to be tightly limited, or there will be issues due to provider-specific limitation. This method allows for Space Access control details to be updated at the same time as space properties.- Parameters:
spaceId-spaceProperties-spaceACLs-
-
getSpaceACLs
Description copied from interface:StorageProviderRetrieves the ACLs associated with a space.- Specified by:
getSpaceACLsin interfaceStorageProvider- Parameters:
spaceId- - ID of the space- Returns:
- Map of space ACLs or empty map if none exists
-
unpackACLs
-
setSpaceACLs
Description copied from interface:StorageProviderSets the ACLs associated with a space.- Specified by:
setSpaceACLsin interfaceStorageProvider- Parameters:
spaceId- - ID of the spacespaceACLs- - Updated space ACL. Note, null or empty arg spaceACLs will 'clear' the space ACLs.
-
packACLs
-
throwIfSpaceNotExist
-
throwIfSpaceNotExist
-
deleteSpace
Deletes a space.- Specified by:
deleteSpacein interfaceStorageProvider- Parameters:
spaceId- - ID of the space
-
deleteSpaceSync
This method is only intended to be used by tests!- Parameters:
spaceId-
-
getSpaceDeleteWorker
-
removeCalculatedProperties
-
setWrappedStorageProvider
Sets an alternate storage provider that can be used for select operations. The motivation for adding this method came from a need to have the deleteSpace operation generate audit events for content items as they were deleted before the space itself was deleted.- Parameters:
wrappedStorageProvider-
-