public class S3ContentReferenceHandlerImpl
extends org.gytheio.content.handler.AbstractUrlContentReferenceHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP_PROTOCOL |
static String |
HTTPS_PROTOCOL |
static String |
S3_PROTOCOL_DELIMITER |
static String |
S3_STORE_PROTOCOL
store protocol that is used as prefix in contentUrls
|
| Constructor and Description |
|---|
S3ContentReferenceHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(org.gytheio.content.ContentReference contentReference) |
InputStream |
getInputStream(org.gytheio.content.ContentReference contentReference,
boolean waitForAvailability) |
protected String |
getRemoteBaseUrl() |
String |
getS3BucketName() |
protected String |
getS3UrlFromHttpUrl(String url) |
void |
init() |
static com.amazonaws.services.s3.AmazonS3 |
initClient(String s3AccessKey,
String s3SecretKey,
String s3BucketRegion) |
boolean |
isContentReferenceExists(org.gytheio.content.ContentReference contentReference) |
boolean |
isContentReferenceSupported(org.gytheio.content.ContentReference contentReference) |
long |
putFile(File sourceFile,
org.gytheio.content.ContentReference targetContentReference) |
long |
putInputStream(InputStream sourceInputStream,
org.gytheio.content.ContentReference targetContentReference) |
void |
setS3AccessKey(String s3AccessKey) |
void |
setS3BucketName(String s3BucketName) |
void |
setS3BucketRegion(String s3BucketLocation) |
void |
setS3SecretKey(String s3SecretKey) |
public static final String S3_STORE_PROTOCOL
public static final String S3_PROTOCOL_DELIMITER
public static final String HTTP_PROTOCOL
public static final String HTTPS_PROTOCOL
public void setS3AccessKey(String s3AccessKey)
public void setS3SecretKey(String s3SecretKey)
public String getS3BucketName()
public void setS3BucketName(String s3BucketName)
public void setS3BucketRegion(String s3BucketLocation)
public void init()
init in class org.gytheio.content.handler.AbstractUrlContentReferenceHandlerpublic static com.amazonaws.services.s3.AmazonS3 initClient(String s3AccessKey, String s3SecretKey, String s3BucketRegion)
protected String getRemoteBaseUrl()
getRemoteBaseUrl in class org.gytheio.content.handler.AbstractUrlContentReferenceHandlerpublic boolean isContentReferenceSupported(org.gytheio.content.ContentReference contentReference)
public boolean isContentReferenceExists(org.gytheio.content.ContentReference contentReference)
public InputStream getInputStream(org.gytheio.content.ContentReference contentReference, boolean waitForAvailability) throws org.gytheio.content.ContentIOException
org.gytheio.content.ContentIOExceptionpublic long putFile(File sourceFile, org.gytheio.content.ContentReference targetContentReference) throws org.gytheio.content.ContentIOException
org.gytheio.content.ContentIOExceptionpublic long putInputStream(InputStream sourceInputStream, org.gytheio.content.ContentReference targetContentReference) throws org.gytheio.content.ContentIOException
org.gytheio.content.ContentIOExceptionpublic void delete(org.gytheio.content.ContentReference contentReference)
throws org.gytheio.content.ContentIOException
org.gytheio.content.ContentIOExceptionCopyright © 2018 Alfresco Software. All rights reserved.