Package org.digidoc4j.impl.asic.asics
Class AsicSCompositeContainer
java.lang.Object
org.digidoc4j.impl.asic.AsicContainer
org.digidoc4j.impl.asic.asics.AsicSContainer
org.digidoc4j.impl.asic.asics.AsicSCompositeContainer
- All Implemented Interfaces:
Serializable
,CompositeContainer
,Container
,org.digidoc4j.impl.ValidatableContainer
A special case of ASiC-S container with timestamp tokens, when the datafile of the container is a nested container.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.digidoc4j.Container
Container.DocumentType
-
Constructor Summary
ConstructorDescriptionAsicSCompositeContainer
(DataFile serializedNestedContainer, Container nestedContainer) AsicSCompositeContainer
(DataFile serializedNestedContainer, Container nestedContainer, Configuration configuration) AsicSCompositeContainer
(AsicParseResult containerParseResult, Container nestedContainer, Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionaddDataFile
(File file, String mimeType) Adds a data file from the file system to the container.addDataFile
(InputStream inputStream, String fileName, String mimeType) Adds a data file from the input stream (i.e. the date file content can be read from the internal memory buffer).addDataFile
(String path, String mimeType) Adds a data file from the file system to the container.void
addDataFile
(DataFile dataFile) Adds the specified data file to the container.Returns the list of data files in the nested inner container.Returns the list of signatures in the nested inner container.Returns the list of timestamp tokens that cover the contents of the nested inner container.Returns the type of the nested container.Returns the list of data files in the nesting outer container.Returns the list of signatures in the nesting outer container.Returns the list of timestamp tokens that cover the contents of the nesting outer container.void
removeDataFile
(DataFile file) Removes the data file from the container.validate()
Validate containervalidateAt
(Date validationTime) Validate container against the specified validation time.Methods inherited from class org.digidoc4j.impl.asic.asics.AsicSContainer
addSignature, addTimestamp, getTimestamps, getTimeStampToken, removeTimestamp, replaceDataFile, save, setTimeStampToken
Methods inherited from class org.digidoc4j.impl.asic.AsicContainer
extendSignatureProfile, extendSignatureProfile, getConfiguration, getContainerParseResult, getDataFiles, getSignatures, getType, isTimestampTokenDefined, removeSignature, saveAsFile, saveAsStream, setType
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.digidoc4j.Container
addSignature, addTimestamp, extendSignatureProfile, extendSignatureProfile, getConfiguration, getDataFiles, getSignatures, getTimestamps, getTimeStampToken, getType, removeSignature, removeTimestamp, save, saveAsFile, saveAsStream, setTimeStampToken
-
Constructor Details
-
AsicSCompositeContainer
-
AsicSCompositeContainer
public AsicSCompositeContainer(DataFile serializedNestedContainer, Container nestedContainer, Configuration configuration) -
AsicSCompositeContainer
public AsicSCompositeContainer(AsicParseResult containerParseResult, Container nestedContainer, Configuration configuration)
-
-
Method Details
-
addDataFile
Description copied from interface:Container
Adds a data file from the file system to the container.Note: Data files can be added to a container only after all signatures have been removed.
- Specified by:
addDataFile
in interfaceContainer
- Overrides:
addDataFile
in classAsicContainer
- Parameters:
path
- data file to be added to the containermimeType
- MIME type of the data file, for example 'text/plain' or 'application/msword'- Returns:
- data file
-
addDataFile
Description copied from interface:Container
Adds a data file from the input stream (i.e. the date file content can be read from the internal memory buffer).Note: Data files can be added to a container only after all signatures have been removed.
- Specified by:
addDataFile
in interfaceContainer
- Overrides:
addDataFile
in classAsicContainer
- Parameters:
inputStream
- input stream from where data is readfileName
- data file name in the containermimeType
- MIME type of the data file, for example 'text/plain' or 'application/msword'- Returns:
- data file
-
addDataFile
Description copied from interface:Container
Adds a data file from the file system to the container.Note: Data files can be added to a container only after all signatures have been removed.
- Specified by:
addDataFile
in interfaceContainer
- Overrides:
addDataFile
in classAsicContainer
- Parameters:
file
- data file to be added to the containermimeType
- MIME type of the data file, for example 'text/plain' or 'application/msword'- Returns:
- data file
-
addDataFile
Description copied from interface:Container
Adds the specified data file to the container.Note: Data files can be added to a container only after all signatures have been removed.
- Specified by:
addDataFile
in interfaceContainer
- Overrides:
addDataFile
in classAsicContainer
- Parameters:
dataFile
- data file to be added to the container
-
removeDataFile
Description copied from interface:Container
Removes the data file from the container.Note: Data files can be removed from a container only after all signatures have been removed.
- Specified by:
removeDataFile
in interfaceContainer
- Overrides:
removeDataFile
in classAsicContainer
- Parameters:
file
- data file to be removed from the container.
-
getNestingContainerDataFiles
Description copied from interface:CompositeContainer
Returns the list of data files in the nesting outer container.- Specified by:
getNestingContainerDataFiles
in interfaceCompositeContainer
- Returns:
- list of data files in the nesting outer container
-
getNestedContainerDataFiles
Description copied from interface:CompositeContainer
Returns the list of data files in the nested inner container.- Specified by:
getNestedContainerDataFiles
in interfaceCompositeContainer
- Returns:
- list of data files in the nested inner container
-
getNestingContainerSignatures
Description copied from interface:CompositeContainer
Returns the list of signatures in the nesting outer container.- Specified by:
getNestingContainerSignatures
in interfaceCompositeContainer
- Returns:
- list of signatures in the nesting outer container
-
getNestedContainerSignatures
Description copied from interface:CompositeContainer
Returns the list of signatures in the nested inner container.- Specified by:
getNestedContainerSignatures
in interfaceCompositeContainer
- Returns:
- list of signatures in the nested inner container
-
getNestingContainerTimestamps
Description copied from interface:CompositeContainer
Returns the list of timestamp tokens that cover the contents of the nesting outer container.- Specified by:
getNestingContainerTimestamps
in interfaceCompositeContainer
- Returns:
- list of timestamp tokens in the nesting outer container
-
getNestedContainerTimestamps
Description copied from interface:CompositeContainer
Returns the list of timestamp tokens that cover the contents of the nested inner container.- Specified by:
getNestedContainerTimestamps
in interfaceCompositeContainer
- Returns:
- list of timestamp tokens in the nested inner container
-
getNestedContainerType
Description copied from interface:CompositeContainer
Returns the type of the nested container.- Specified by:
getNestedContainerType
in interfaceCompositeContainer
- Returns:
- type of the nested container
- See Also:
-
validate
Description copied from interface:Container
Validate container- Specified by:
validate
in interfaceContainer
- Overrides:
validate
in classAsicContainer
- Returns:
- validation result
-
validateAt
Description copied from interface:org.digidoc4j.impl.ValidatableContainer
Validate container against the specified validation time.- Specified by:
validateAt
in interfaceorg.digidoc4j.impl.ValidatableContainer
- Overrides:
validateAt
in classAsicContainer
- Parameters:
validationTime
- validation time- Returns:
- container validation result
-