Package org.mapfish.print.config
Class S3ReportStorage
java.lang.Object
org.mapfish.print.config.S3ReportStorage
- All Implemented Interfaces:
ConfigurationObject,ReportStorage
Configuration for storing the reports in a S3 compatible storage.
By default, authentication is done using the DefaultAWSCredentialsProviderChain which
uses Environment Variables, Java System Properties, Credential profiles file, ...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringCompute the key to use.intSave the report in the storage.voidsetAccessKey(String accessKey) To set the access key.voidThe S3 bucket to use.voidsetEndpointUrl(String endpointUrl) To override the endpoint URL (for non-Amazon, S3 compatible servers).voidThe key prefix to use.voidTo set the region to use.voidsetRetentionDays(int retentionDays) The number of day the reports must be kept.voidsetSecretKey(String secretKey) To set the secret key.voidvalidate(List<Throwable> validationErrors, Configuration configuration) validate that the configuration was correct.
-
Constructor Details
-
S3ReportStorage
public S3ReportStorage()
-
-
Method Details
-
save
Description copied from interface:ReportStorageSave the report in the storage.- Specified by:
savein interfaceReportStorage- Parameters:
ref- The reference number.filename- The filename.extension- The file extension.mimeType- The mime type.file- The file containing the report.- Returns:
- The URL that can be used to fetch the result.
-
getKey
Compute the key to use.- Parameters:
ref- The reference number.filename- The filename.extension- The file extension.
-
validate
Description copied from interface:ConfigurationObjectvalidate that the configuration was correct.- Specified by:
validatein interfaceConfigurationObject- Parameters:
validationErrors- a list to add any detected errors to.configuration- the containing configuration
-
getAccessKey
-
setAccessKey
To set the access key.- Parameters:
accessKey- the value.
-
getSecretKey
-
setSecretKey
To set the secret key.- Parameters:
secretKey- the value.
-
getRegion
-
setRegion
To set the region to use.- Parameters:
region- the value.
-
getEndpointUrl
-
setEndpointUrl
To override the endpoint URL (for non-Amazon, S3 compatible servers).- Parameters:
endpointUrl- the value.
-
getBucket
-
setBucket
The S3 bucket to use.- Parameters:
bucket- the value.
-
getPrefix
-
setPrefix
The key prefix to use.- Parameters:
prefix- the value.
-
getRetentionDays
public int getRetentionDays() -
setRetentionDays
public void setRetentionDays(int retentionDays) The number of day the reports must be kept.Passed this delay, they will be deleted and the links included in the corresponding emails will become invalid. Defaults to 7 days.
- Parameters:
retentionDays- the value.
-