public abstract class OpenStackStorageProvider extends StorageProviderBase
StorageProviderBase.SpaceDeleteWorkerACL_DELIM, ACL_GROUP_READ, ACL_GROUP_WRITE, ACL_USER_READ, ACL_USER_WRITEDEFAULT_MAX_RESULTS, DEFAULT_MIMETYPE, ISO8601_DATE_FORMAT, 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_SPACE_ACL, PROPERTIES_SPACE_ACL_GROUP, PROPERTIES_SPACE_ACL_PUBLIC, PROPERTIES_SPACE_COUNT, PROPERTIES_SPACE_CREATED, PROPERTIES_SPACE_SIZE, PROPERTIES_STREAMING_HOST, PROPERTIES_STREAMING_TYPE| Constructor and Description |
|---|
OpenStackStorageProvider(String username,
String apiAccessKey) |
OpenStackStorageProvider(String username,
String apiAccessKey,
String authUrl) |
OpenStackStorageProvider(org.jclouds.openstack.swift.SwiftClient swiftClient) |
| Modifier and Type | Method and Description |
|---|---|
String |
addContent(String spaceId,
String contentId,
String contentMimeType,
Map<String,String> userProperties,
long contentSize,
String contentChecksum,
InputStream content) |
String |
copyContent(String sourceSpaceId,
String sourceContentId,
String destSpaceId,
String destContentId) |
void |
createSpace(String spaceId) |
protected com.google.common.util.concurrent.ListeningExecutorService |
createThreadPool() |
void |
deleteContent(String spaceId,
String contentId) |
protected void |
doSetSpaceProperties(String spaceId,
Map<String,String> spaceProperties) |
protected Map<String,String> |
getAllSpaceProperties(String spaceId) |
abstract String |
getAuthUrl() |
protected String |
getContainerName(String spaceId)
Converts a provided space ID into a valid Rackspace container name.
|
InputStream |
getContent(String spaceId,
String contentId) |
Map<String,String> |
getContentProperties(String spaceId,
String contentId) |
abstract String |
getProviderName() |
Iterator<String> |
getSpaceContents(String spaceId,
String prefix) |
List<String> |
getSpaceContentsChunked(String spaceId,
String prefix,
long maxResults,
String marker) |
protected String |
getSpaceFree(String name)
Replaces all spaces with "%20"
|
Iterator<String> |
getSpaces() |
protected String |
getWithSpace(String name)
Converts "%20" back to spaces
|
void |
removeSpace(String spaceId) |
static String |
sanitizeForURI(String str)
Encode any unicode characters that will cause us problems.
|
void |
setContentProperties(String spaceId,
String contentId,
Map<String,String> contentProperties) |
protected boolean |
spaceExists(String spaceId) |
deleteSpace, deleteSpaceSync, getSpaceACLs, getSpaceDeleteWorker, getSpaceProperties, packACLs, removeCalculatedProperties, setNewSpaceProperties, setNewSpaceProperties, setSpaceACLs, setWrappedStorageProvider, throwIfSpaceExists, throwIfSpaceNotExist, throwIfSpaceNotExist, unpackACLspublic OpenStackStorageProvider(String username, String apiAccessKey, String authUrl)
public OpenStackStorageProvider(org.jclouds.openstack.swift.SwiftClient swiftClient)
protected com.google.common.util.concurrent.ListeningExecutorService createThreadPool()
public abstract String getAuthUrl()
public abstract String getProviderName()
public List<String> getSpaceContentsChunked(String spaceId, String prefix, long maxResults, String marker)
protected boolean spaceExists(String spaceId)
spaceExists in class StorageProviderBasepublic void createSpace(String spaceId)
protected void doSetSpaceProperties(String spaceId, Map<String,String> spaceProperties)
doSetSpaceProperties in class StorageProviderBasepublic void removeSpace(String spaceId)
removeSpace in class StorageProviderBaseprotected Map<String,String> getAllSpaceProperties(String spaceId)
getAllSpaceProperties in class StorageProviderBasepublic String addContent(String spaceId, String contentId, String contentMimeType, Map<String,String> userProperties, long contentSize, String contentChecksum, InputStream content)
public String copyContent(String sourceSpaceId, String sourceContentId, String destSpaceId, String destContentId)
public InputStream getContent(String spaceId, String contentId)
public void setContentProperties(String spaceId, String contentId, Map<String,String> contentProperties)
public Map<String,String> getContentProperties(String spaceId, String contentId)
protected String getContainerName(String spaceId)
spaceId - user preferred ID of the spacepublic static String sanitizeForURI(String str)
str - protected String getSpaceFree(String name)
name - string with possible spaceCopyright © 2009–2015 DuraSpace. All rights reserved.