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 String
Compute the key to use.int
Save the report in the storage.void
setAccessKey
(String accessKey) To set the access key.void
The S3 bucket to use.void
setEndpointUrl
(String endpointUrl) To override the endpoint URL (for non-Amazon, S3 compatible servers).void
The key prefix to use.void
To set the region to use.void
setRetentionDays
(int retentionDays) The number of day the reports must be kept.void
setSecretKey
(String secretKey) To set the secret key.void
validate
(List<Throwable> validationErrors, Configuration configuration) validate that the configuration was correct.
-
Constructor Details
-
S3ReportStorage
public S3ReportStorage()
-
-
Method Details
-
save
Description copied from interface:ReportStorage
Save the report in the storage.- Specified by:
save
in 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:ConfigurationObject
validate that the configuration was correct.- Specified by:
validate
in 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.
-