public class EDoc2Batch extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this batch job and releases associated system resources.
|
List<EDoc2BatchResult> |
complete()
Completes the signature by adding the required revocation values.
|
List<EDoc2BatchResult> |
complete(boolean useTrustedList)
Completes the signature by adding the required revocation values.
|
static EDoc2Batch |
fromFiles(File[] files)
Prepare a new batch job from the given files.
|
static EDoc2Batch |
fromFiles(File[] files,
boolean openAsEDoc)
Prepare a new batch job from the given files.
|
Map<String,byte[]> |
getSignableBytes()
Returns signable bytes.
|
Map<String,byte[]> |
getSignableBytes(Map<String,String> properties)
Returns signable bytes with specified properties.
|
Map<String,String> |
getSignatureMethodAlgorithm()
Returns algorithm name of the signature method.
|
Map<String,byte[]> |
getSignatureValueDigest(String messageDigestAlgorithm)
Returns hash value of the signature value.
|
void |
setSignatureProductionPlace(SignatureProductionPlace signatureProductionPlace)
Sets claimed signature production location.
|
void |
setSignatureTimestamps(Map<String,List<byte[]>> signatureTimestampsMap)
Sets a list of ASN.1 encoded signature timestamps to the signature.
|
void |
setSignatureTimestamps(String messageDigestAlgorithm,
KeyAccessor keyAccessor)
Requests and sets signature timestamps to the signature.
|
void |
setSignatureValue(Map<String,byte[]> signatureValueMap)
Sets a signature value to the signature.
|
void |
setSignerClaimedRoles(List<String> signerClaimedRoles)
Sets claimed signer roles for the signature.
|
void |
setSigningCertificate(X509Certificate certificate)
Sets signing certificate for the signature.
|
public static EDoc2Batch fromFiles(File[] files) throws EDoc2Exception
files - files to process.EDoc2Exception - if an error occurs.public static EDoc2Batch fromFiles(File[] files, boolean openAsEDoc) throws EDoc2Exception
files - files files to process.openAsEDoc - true if the given files are EDOC documents.EDoc2Exception - if an error occurs.public void setSigningCertificate(X509Certificate certificate)
certificate - signing certificate.public void setSignerClaimedRoles(List<String> signerClaimedRoles)
signerClaimedRoles - a list of claimed roles.public void setSignatureProductionPlace(SignatureProductionPlace signatureProductionPlace)
signatureProductionPlace - public Map<String,byte[]> getSignableBytes() throws EDoc2Exception
EDoc2Exception - if an error occurs.setSignatureValue(Map)public Map<String,byte[]> getSignableBytes(Map<String,String> properties) throws EDoc2Exception
properties - EDoc2Exception - if an error occurs.setSignatureValue(Map),
EDoc2Signature.KEY_SIGNATURE_METHOD_URIpublic Map<String,String> getSignatureMethodAlgorithm() throws EDoc2Exception
EDoc2Exception - if an error occurs.getSignableBytes(),
getSignableBytes(Map)public void setSignatureValue(Map<String,byte[]> signatureValueMap) throws EDoc2Exception
signatureValueMap - a map containing signature value bytes for each of the input files.EDoc2Exception - if an error occurs.getSignableBytes(),
getSignableBytes(Map)public Map<String,byte[]> getSignatureValueDigest(String messageDigestAlgorithm) throws EDoc2Exception
messageDigestAlgorithm - signature value digest algorithm name.EDoc2Exception - if an error occurs.setSignatureTimestamps(Map)public void setSignatureTimestamps(Map<String,List<byte[]>> signatureTimestampsMap) throws EDoc2Exception
signatureTimestampsMap - a map containing timestamp bytes for each of the input file signatures.EDoc2Exception - if an error occurs.getSignatureValueDigest(String)public void setSignatureTimestamps(String messageDigestAlgorithm, KeyAccessor keyAccessor) throws EDoc2Exception
messageDigestAlgorithm - signature value digest algorithm name.keyAccessor - a KeyAccessor instance used to select a certificate required for TSA client authentication.EDoc2Exception - if an error occurs.public List<EDoc2BatchResult> complete() throws EDoc2Exception
EDoc2Exception - if an error occurs.close()public List<EDoc2BatchResult> complete(boolean useTrustedList) throws EDoc2Exception
useTrustedList - whether to use EU Trusted Status List data.EDoc2Exception - if an error occurs.public void close()