public class WPBAwsS3FileStorage extends Object implements com.webpagebytes.cms.WPBFileStorage
Modifier and Type | Field and Description |
---|---|
protected String |
aws_bucket |
static String |
CONFIG_ACCESS_KEY |
static String |
CONFIG_BUCKET |
static String |
CONFIG_ENDPOINT |
static String |
CONFIG_PROTOCOL |
static String |
CONFIG_SECRET_KEY |
static String |
CONFIG_WPB_PUBLIC_PATH |
protected String |
publicBasePath |
protected com.amazonaws.services.s3.AmazonS3Client |
s3client |
Constructor and Description |
---|
WPBAwsS3FileStorage() |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteFile(com.webpagebytes.cms.WPBFilePath file) |
InputStream |
getFileContent(com.webpagebytes.cms.WPBFilePath file) |
com.webpagebytes.cms.WPBFileInfo |
getFileInfo(com.webpagebytes.cms.WPBFilePath file) |
String |
getPublicFileUrl(com.webpagebytes.cms.WPBFilePath file) |
void |
initialize(Map<String,String> params) |
void |
storeFile(InputStream is,
com.webpagebytes.cms.WPBFilePath file) |
void |
updateContentType(com.webpagebytes.cms.WPBFilePath file,
String contentType) |
void |
updateFileCustomProperties(com.webpagebytes.cms.WPBFilePath file,
Map<String,String> customProps) |
public static final String CONFIG_ACCESS_KEY
public static final String CONFIG_SECRET_KEY
public static final String CONFIG_PROTOCOL
public static final String CONFIG_ENDPOINT
public static final String CONFIG_BUCKET
public static final String CONFIG_WPB_PUBLIC_PATH
protected com.amazonaws.services.s3.AmazonS3Client s3client
protected String aws_bucket
protected String publicBasePath
public void initialize(Map<String,String> params) throws com.webpagebytes.cms.exception.WPBIOException
initialize
in interface com.webpagebytes.cms.WPBFileStorage
com.webpagebytes.cms.exception.WPBIOException
public void storeFile(InputStream is, com.webpagebytes.cms.WPBFilePath file) throws IOException
storeFile
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public com.webpagebytes.cms.WPBFileInfo getFileInfo(com.webpagebytes.cms.WPBFilePath file) throws IOException
getFileInfo
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public boolean deleteFile(com.webpagebytes.cms.WPBFilePath file) throws IOException
deleteFile
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public InputStream getFileContent(com.webpagebytes.cms.WPBFilePath file) throws IOException
getFileContent
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public void updateFileCustomProperties(com.webpagebytes.cms.WPBFilePath file, Map<String,String> customProps) throws IOException
updateFileCustomProperties
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public void updateContentType(com.webpagebytes.cms.WPBFilePath file, String contentType) throws IOException
updateContentType
in interface com.webpagebytes.cms.WPBFileStorage
IOException
public String getPublicFileUrl(com.webpagebytes.cms.WPBFilePath file)
getPublicFileUrl
in interface com.webpagebytes.cms.WPBFileStorage
Copyright © 2016. All rights reserved.