Package org.digidoc4j.impl.asic.cades
Class ContainerTimestampWrapper
java.lang.Object
org.digidoc4j.impl.asic.cades.ContainerTimestampWrapper
- All Implemented Interfaces:
Serializable,TimestampAndManifestPair
An immutable wrapper that holds a CAdES timestamp and an optional ASiCArchiveManifest associated with it.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContainerTimestampWrapper(CadesTimestamp cadesTimestamp) Creates a new instance by wrapping a CAdES timestamp.ContainerTimestampWrapper(CadesTimestamp cadesTimestamp, AsicArchiveManifest archiveManifest) Creates a new instance by wrapping a CAdES timestamp and an ASiCArchiveManifest. -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance ofAsicArchiveManifestassociated with this entity, if present.Returns an instance ofCadesTimestampassociated with this entity.withArchiveManifest(AsicArchiveManifest archiveManifest) Creates a copy of the initial wrapper by wrapping the specified ASiCArchiveManifest, retaining the original CAdES signature.
-
Constructor Details
-
ContainerTimestampWrapper
Creates a new instance by wrapping a CAdES timestamp.- Parameters:
cadesTimestamp- CAdES timestamp
-
ContainerTimestampWrapper
public ContainerTimestampWrapper(CadesTimestamp cadesTimestamp, AsicArchiveManifest archiveManifest) Creates a new instance by wrapping a CAdES timestamp and an ASiCArchiveManifest.- Parameters:
cadesTimestamp- CAdES timestamparchiveManifest- ASiCArchiveManifest
-
-
Method Details
-
withArchiveManifest
Creates a copy of the initial wrapper by wrapping the specified ASiCArchiveManifest, retaining the original CAdES signature.- Parameters:
archiveManifest- ASiCArchiveManifest- Returns:
- new wrapper with the original CAdES timestamp and the specified ASiCArchiveManifest
-
getCadesTimestamp
Description copied from interface:TimestampAndManifestPairReturns an instance ofCadesTimestampassociated with this entity.- Specified by:
getCadesTimestampin interfaceTimestampAndManifestPair- Returns:
- CAdES timestamp instance
-
getArchiveManifest
Description copied from interface:TimestampAndManifestPairReturns an instance ofAsicArchiveManifestassociated with this entity, if present.- Specified by:
getArchiveManifestin interfaceTimestampAndManifestPair- Returns:
- ASiCArchiveManifest or
null
-