Class TempFileResourcesHandlerBuilder
java.lang.Object
eu.europa.esig.dss.signature.resources.TempFileResourcesHandlerBuilder
- All Implemented Interfaces:
DSSResourcesHandlerBuilder
This class creates a
TempFileResourcesHandlerBuilder
storing temporary objects to temporary filesystem documents-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating an empty list of processed handlers -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
This method is used to remove all handlers created by the current builder, as well as temporary files from the filesystem.This method instantiates the corresponding factory.setFileNamePrefix
(String fileNamePrefix) Sets the filename prefix (beginning) for created temporary documents Default : "dss-"setFileNameSuffix
(String fileNameSuffix) Sets the filename suffix (ending/extension) for created temporary documents Default : ".tmp"setTempFileDirectory
(File tempFileDirectory) Sets a file directory to be used for staring created documents Default : temporary system-dependent location
-
Constructor Details
-
TempFileResourcesHandlerBuilder
public TempFileResourcesHandlerBuilder()Default constructor instantiating an empty list of processed handlers
-
-
Method Details
-
setFileNamePrefix
Sets the filename prefix (beginning) for created temporary documents Default : "dss-"- Parameters:
fileNamePrefix
-String
- Returns:
TempFileResourcesHandlerBuilder
this builder
-
setFileNameSuffix
Sets the filename suffix (ending/extension) for created temporary documents Default : ".tmp"- Parameters:
fileNameSuffix
-String
- Returns:
TempFileResourcesHandlerBuilder
this builder
-
setTempFileDirectory
Sets a file directory to be used for staring created documents Default : temporary system-dependent location- Parameters:
tempFileDirectory
-File
representing a directory for storing the temporary files- Returns:
TempFileResourcesHandlerBuilder
this builder
-
createResourcesHandler
Description copied from interface:DSSResourcesHandlerBuilder
This method instantiates the corresponding factory.- Specified by:
createResourcesHandler
in interfaceDSSResourcesHandlerBuilder
- Returns:
- factory
DSSResourcesHandler
-
clear
public void clear()This method is used to remove all handlers created by the current builder, as well as temporary files from the filesystem. This method is not executed in a normal DSS operating, and should be called on user's side when the temporary files are no longer needed. NOTE: do not forget to preserve the output documents, such as a FileDocument returned by a#signDocument()
method.
-