Class SimpleASiCWithXAdESFilenameFactory
java.lang.Object
eu.europa.esig.dss.asic.common.AbstractASiCFilenameFactory
eu.europa.esig.dss.asic.xades.signature.DefaultASiCWithXAdESFilenameFactory
eu.europa.esig.dss.asic.xades.signature.SimpleASiCWithXAdESFilenameFactory
- All Implemented Interfaces:
ASiCWithXAdESFilenameFactory
,Serializable
This class provides a simple way to define custom names for file entries created within an ASiC with XAdES container,
by using set and get methods.
This factory adds "META-INF/" prefix to the filename, when required.
When a target filename for a particular document type is not specified,
then the default processing will take precedence.
NOTE: This factory shall be modified when consequently signing/extending a single container.
WARN: The class does not verify the conformance of the defined filenames to the EN 319 162-1 standard.
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating factory with null values -
Method Summary
Modifier and TypeMethodDescriptiongetDataPackageFilename
(ASiCContent asicContent) Returns a name of a ZIP archive containing signed documents in case of an ASiC-E signature, when applicablegetManifestFilename
(ASiCContent asicContent) Returns a filename of a manifest file to be createdgetSignatureFilename
(ASiCContent asicContent) Returns a filename for a signature file to be createdprotected String
getValidManifestFilename
(String manifestFilename, ASiCContent asicContent) This method returns a valid manifest filenameprotected String
getValidSignatureFilename
(String signatureFilename, ASiCContent asicContent) This method returns a valid signature filenamevoid
setDataPackageFilename
(String dataPackageFilename) Sets a filename for a new ZIP data package (when applicable).void
setManifestFilename
(String manifestFilename) Sets a filename for a new manifest document (when applicable).void
setSignatureFilename
(String signatureFilename) Sets a filename for a new signature document (when applicable).Methods inherited from class eu.europa.esig.dss.asic.common.AbstractASiCFilenameFactory
assertASiCContentIsValid, assertFilenameValid, getNextAvailableDocumentName, getValidDataPackageFilename, getWithMetaInfFolder, isAvailableName
-
Constructor Details
-
SimpleASiCWithXAdESFilenameFactory
public SimpleASiCWithXAdESFilenameFactory()Default constructor instantiating factory with null values
-
-
Method Details
-
getSignatureFilename
Description copied from interface:ASiCWithXAdESFilenameFactory
Returns a filename for a signature file to be created- Specified by:
getSignatureFilename
in interfaceASiCWithXAdESFilenameFactory
- Overrides:
getSignatureFilename
in classDefaultASiCWithXAdESFilenameFactory
- Parameters:
asicContent
-ASiCContent
representing a content of an ASiC container- Returns:
String
signature filename
-
setSignatureFilename
Sets a filename for a new signature document (when applicable). NOTE: The name of the signature file shall be: - ASiC-S with XAdES : "META-INF/signatures.xml"; - ASiC-E with XAdES : "META-INF/signatures*.xml"; - OpenDocument : "META-INF/documentsignatures.xml". "META-INF/" is optional.- Parameters:
signatureFilename
-String
-
getManifestFilename
Description copied from interface:ASiCWithXAdESFilenameFactory
Returns a filename of a manifest file to be created- Specified by:
getManifestFilename
in interfaceASiCWithXAdESFilenameFactory
- Overrides:
getManifestFilename
in classDefaultASiCWithXAdESFilenameFactory
- Parameters:
asicContent
-ASiCContent
representing a content of an ASiC container- Returns:
String
manifest filename
-
setManifestFilename
Sets a filename for a new manifest document (when applicable). NOTE: The name of the manifest file shall be: - ASiC-E with XAdES : "META-INF/manifest.xml". "META-INF/" is optional.- Parameters:
manifestFilename
-String
-
getDataPackageFilename
Description copied from interface:ASiCWithXAdESFilenameFactory
Returns a name of a ZIP archive containing signed documents in case of an ASiC-E signature, when applicable- Specified by:
getDataPackageFilename
in interfaceASiCWithXAdESFilenameFactory
- Overrides:
getDataPackageFilename
in classDefaultASiCWithXAdESFilenameFactory
- Parameters:
asicContent
-ASiCContent
representing a content of an ASiC container- Returns:
String
data package filename
-
setDataPackageFilename
Sets a filename for a new ZIP data package (when applicable). NOTE: The name of the data package file shall be: - ASiC-S with XAdES : "*.zip".- Parameters:
dataPackageFilename
-String
-
getValidSignatureFilename
This method returns a valid signature filename- Parameters:
signatureFilename
-String
defined signature filenameasicContent
-ASiCContent
- Returns:
String
signature filename
-
getValidManifestFilename
This method returns a valid manifest filename- Parameters:
manifestFilename
-String
defined manifest filenameasicContent
-ASiCContent
- Returns:
String
manifest filename
-