public abstract class AsicContainer extends Object implements Container
Container.DocumentType
Modifier and Type | Method and Description |
---|---|
void |
addDataFile(DataFile dataFile)
Adds a data file from the file system to the container.
|
DataFile |
addDataFile(File file,
String mimeType)
Adds a data file from the file system to the container.
|
DataFile |
addDataFile(InputStream inputStream,
String fileName,
String mimeType)
Adds a data file from the input stream (i.e.
|
DataFile |
addDataFile(String path,
String mimeType)
Adds a data file from the file system to the container.
|
void |
addSignature(Signature signature)
Adds a new signature to the container.
|
void |
extendSignatureProfile(SignatureProfile profile)
Extends signature profile to SignatureProfile
|
Configuration |
getConfiguration()
Gets Configuration
|
AsicParseResult |
getContainerParseResult() |
List<DataFile> |
getDataFiles()
Returns all data files in the container.
|
List<Signature> |
getSignatures()
Returns a list of all signatures in the container.
|
String |
getType()
Returns container type "BDOC" or "DDOC"
|
boolean |
isTimestampTokenDefined()
Deprecated.
Deprecated for removal
|
void |
removeDataFile(DataFile file)
Removes the data file from the container.
|
void |
removeSignature(Signature signature)
Removes the signature from the container
|
File |
saveAsFile(String filePath)
Saves the container to the specified location.
|
InputStream |
saveAsStream()
Saves the container as a stream.
|
void |
setTimeStampToken(DataFile timeStampToken)
Deprecated.
|
void |
setType(String containerType)
Deprecated.
Deprecated for removal. Use appropriate constructor instead.
|
ContainerValidationResult |
validate()
Validate container
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTimeStampToken, save
@Deprecated public AsicContainer(String containerPath, String containerType)
ContainerOpener.open(String)
or
ContainerBuilder.fromExistingFile(String)
instead.containerPath
- pathcontainerType
- type@Deprecated public AsicContainer(String containerPath, Configuration configuration, String containerType)
ContainerOpener.open(String, Configuration)
or
ContainerBuilder.fromExistingFile(String)
instead.containerPath
- pathconfiguration
- configurationcontainerType
- type@Deprecated public AsicContainer(InputStream stream, String containerType)
ContainerOpener.open(InputStream, Configuration)
or
ContainerBuilder.fromStream(InputStream)
instead.stream
- input streamcontainerType
- type@Deprecated public AsicContainer(InputStream stream, Configuration configuration, String containerType)
ContainerOpener.open(InputStream, Configuration)
or
ContainerBuilder.fromStream(InputStream)
instead.stream
- input streamconfiguration
- configurationcontainerType
- type@Deprecated public AsicContainer(AsicParseResult containerParseResult, Configuration configuration, String containerType)
AsicContainer(AsicParseResult, Configuration)
instead.containerParseResult
- container parsed resultconfiguration
- configurationcontainerType
- container typepublic ContainerValidationResult validate()
Container
public File saveAsFile(String filePath)
Container
saveAsFile
in interface Container
filePath
- file name and path.public Configuration getConfiguration()
Container
getConfiguration
in interface Container
public InputStream saveAsStream()
Container
saveAsStream
in interface Container
@Deprecated public void setType(String containerType)
containerType
- container typepublic String getType()
Container
public List<DataFile> getDataFiles()
Container
getDataFiles
in interface Container
public DataFile addDataFile(String path, String mimeType)
Container
Note: Data files can be removed from a container only after all signatures have been removed.
addDataFile
in interface Container
path
- data file to be added to the containermimeType
- MIME type of the data file, for example 'text/plain' or 'application/msword'public DataFile addDataFile(InputStream inputStream, String fileName, String mimeType)
Container
Note: Data files can be added to a container only after all signatures have been removed.
addDataFile
in interface Container
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'public DataFile addDataFile(File file, String mimeType)
Container
Note: Data files can be removed from a container only after all signatures have been removed.
addDataFile
in interface Container
file
- data file to be added to the containermimeType
- MIME type of the data file, for example 'text/plain' or 'application/msword'public void addDataFile(DataFile dataFile)
Container
Note: Data files can be removed from a container only after all signatures have been removed.
addDataFile
in interface Container
dataFile
- data file to be added to the containerpublic void addSignature(Signature signature)
Container
addSignature
in interface Container
signature
- signature to be added.@Deprecated public void setTimeStampToken(DataFile timeStampToken)
setTimeStampToken
in interface Container
timeStampToken
- @Deprecated public boolean isTimestampTokenDefined()
true
if timestamp token is defined, otherwise false
public void extendSignatureProfile(SignatureProfile profile)
Container
extendSignatureProfile
in interface Container
profile
- signature profileSignatureProfile
public void removeSignature(Signature signature)
Container
removeSignature
in interface Container
signature
- signature to be removed.public void removeDataFile(DataFile file)
Container
Note: Data files can be removed from a container only after all signatures have been removed.
removeDataFile
in interface Container
file
- data file to be removed from the container.public List<Signature> getSignatures()
Container
getSignatures
in interface Container
public AsicParseResult getContainerParseResult()
Copyright © 2023. All rights reserved.