public class S3Manager extends java.lang.Object implements IGeppettoS3Manager
Modifier and Type | Field and Description |
---|---|
private static Log |
_logger |
private AmazonS3 |
_s3Connection |
private static S3Manager |
instance |
Modifier | Constructor and Description |
---|---|
private |
S3Manager() |
Modifier and Type | Method and Description |
---|---|
void |
deleteFromS3(java.lang.String path)
Delete the file given by the path from S3.
|
long |
getFileStorage(java.lang.String path) |
static S3Manager |
getInstance() |
private AmazonS3 |
getS3Connection() |
java.net.URL |
getURL(java.lang.String path) |
java.util.List<S3ObjectSummary> |
retrievePathsFromS3(java.lang.String prefix)
Return the object pointers to the files that are stored at the paths starting with a given prefix.
|
void |
saveFileToS3(java.io.File file,
java.lang.String path)
Save a file to S3.
|
void |
saveTextToS3(java.lang.String text,
java.lang.String path)
Save a text to S3.
|
private AmazonS3 _s3Connection
private static Log _logger
private static S3Manager instance
public static S3Manager getInstance()
private AmazonS3 getS3Connection()
public void saveFileToS3(java.io.File file, java.lang.String path)
saveFileToS3
in interface IGeppettoS3Manager
file
- path
- public long getFileStorage(java.lang.String path)
public void saveTextToS3(java.lang.String text, java.lang.String path) throws java.io.IOException
saveTextToS3
in interface IGeppettoS3Manager
text
- path
- java.io.IOException
public java.util.List<S3ObjectSummary> retrievePathsFromS3(java.lang.String prefix)
prefix
- public void deleteFromS3(java.lang.String path)
deleteFromS3
in interface IGeppettoS3Manager
path
- public java.net.URL getURL(java.lang.String path) throws java.net.MalformedURLException
getURL
in interface IGeppettoS3Manager
java.net.MalformedURLException