public class DDocContainer extends Object implements Container
Container.DocumentType
Constructor and Description |
---|
DDocContainer(DDocFacade ddoc4jFacade)
DDocContainer constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataFile(DataFile dataFile)
Adds the specified data file to the container.
|
DataFile |
addDataFile(File file,
String mimeType)
Adds a data file from the file system to the container.
|
DataFile |
addDataFile(InputStream is,
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).
|
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 |
addTimestamp(Timestamp timestamp)
Adds a new timestamp token covering the contents of this container.
|
void |
extendSignatureProfile(SignatureProfile profile)
Extends profile of all signatures to SignatureProfile
|
void |
extendSignatureProfile(SignatureProfile profile,
List<Signature> signaturesToExtend)
Extends profile of selected signatures to SignatureProfile
|
Configuration |
getConfiguration()
Gets Configuration
|
List<DataFile> |
getDataFiles()
Returns the list of data files in the container.
|
DDocFacade |
getDDoc4JFacade()
This method returns Returns DDocFacade.
|
String |
getFormat()
Returns ddoc format
|
List<Signature> |
getSignatures()
Returns the list of signatures in the container.
|
DataFile |
getTimeStampToken()
Deprecated.
|
String |
getType()
Returns container type
|
void |
removeDataFile(DataFile file)
Removes the data file from the container.
|
void |
removeSignature(Signature signature)
Removes the signature from the container
|
void |
removeTimestamp(Timestamp timestamp)
Removes the specified timestamp token from this container.
|
void |
save(OutputStream out)
Saves the container to the java.io.OutputStream.
|
File |
saveAsFile(String fileName)
Saves the container to the specified location.
|
InputStream |
saveAsStream()
Saves the container as a stream.
|
void |
setTimeStampToken(DataFile timeStampToken)
Deprecated.
|
ContainerValidationResult |
validate()
Validate container
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTimestamps
public DDocContainer(DDocFacade ddoc4jFacade)
ddoc4jFacade
- public DataFile addDataFile(String path, String mimeType)
Container
Note: Data files can be added to 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 is, 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
is
- 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 added to 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 added to 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.public List<DataFile> getDataFiles()
Container
getDataFiles
in interface Container
public String getType()
public List<Signature> getSignatures()
Container
getSignatures
in interface Container
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 void removeSignature(Signature signature)
Container
removeSignature
in interface Container
signature
- signature to be removed.public void extendSignatureProfile(SignatureProfile profile)
Container
extendSignatureProfile
in interface Container
profile
- signature profileSignatureProfile
public void extendSignatureProfile(SignatureProfile profile, List<Signature> signaturesToExtend)
Container
extendSignatureProfile
in interface Container
profile
- signature profilesignaturesToExtend
- signatures selected for extensionSignatureProfile
public File saveAsFile(String fileName)
Container
saveAsFile
in interface Container
fileName
- file name and path.public InputStream saveAsStream()
Container
saveAsStream
in interface Container
public ContainerValidationResult validate()
Container
public void addTimestamp(Timestamp timestamp)
Container
addTimestamp
in interface Container
timestamp
- timestamp to add to this containerpublic void removeTimestamp(Timestamp timestamp)
Container
Note: A timestamp token can be removed from a container only if the container does not contain any other timestamp tokens that cover the timestamp token to be removed.
removeTimestamp
in interface Container
timestamp
- timestamp token to remove from this container@Deprecated public void setTimeStampToken(DataFile timeStampToken)
Container
setTimeStampToken
in interface Container
timeStampToken
- timestamp token@Deprecated public DataFile getTimeStampToken()
Container
getTimeStampToken
in interface Container
public Configuration getConfiguration()
Container
getConfiguration
in interface Container
public void save(OutputStream out)
save
in interface Container
out
- output stream.OutputStream
public DDocFacade getDDoc4JFacade()
public String getFormat()
Copyright © 2024. All rights reserved.