public abstract class SignatureExplorer2
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected SignaturePolicyCatalog |
acceptableExplicitPolicies |
protected RestPkiClient |
client |
protected java.lang.String |
defaultSignaturePolicyId |
protected boolean |
ignoreRevocationStatusUnknown |
protected java.lang.String |
securityContextId |
protected boolean |
trustUncertifiedSigningTime |
protected boolean |
validate |
| Constructor and Description |
|---|
SignatureExplorer2(RestPkiClient client)
Create a new instance using the given RestPkiClient.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.lacunasoftware.restpki.OpenSignatureRequestModel |
fillRequest(com.lacunasoftware.restpki.OpenSignatureRequestModel request) |
SignaturePolicyCatalog |
getAcceptableExplicitPolicies() |
RestPkiClient |
getClient() |
java.lang.String |
getDefaultSignaturePolicyId() |
java.lang.String |
getSecurityContextId() |
com.lacunasoftware.restpki.FileRef |
getSignatureFile() |
boolean |
isTrustUncertifiedSigningTime() |
boolean |
isValidate() |
void |
setAcceptableExplicitPolicies(SignaturePolicyCatalog policyCatalog)
Sets the "catalog" of explicit policies that should be accepted when validating signatures
with an explicit validation policy attribute.
|
void |
setClient(RestPkiClient client) |
void |
setDefaultSignaturePolicy(SignaturePolicy signaturePolicy)
Sets the default signature policy to be used to validate signatures.
|
void |
setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
Sets the option of "IgnoreRevocationStatusUnknown".
|
void |
setSecurityContext(SecurityContext securityContext)
Sets the security context to be used to validate the signatures.
|
void |
setSignatureFile(BlobReference fileBlob)
Sets the signature to be signed from its blob reference
|
void |
setSignatureFile(byte[] content)
Sets the signature file to be opened.
|
void |
setSignatureFile(FileResult fileResult)
Sets the signature to be signed from a file result from a previous call to Rest PKI.
|
void |
setSignatureFile(java.io.InputStream stream)
Sets the PDF to be signed via a stream object
|
void |
setSignatureFile(java.nio.file.Path path)
Sets the file path of the signature file to be opened.
|
void |
setSignatureFile(java.lang.String path)
Sets the file path of the signature file to be opened.
|
void |
setTrustUncertifiedSigningTime(boolean trustUncertifiedSigningTime) |
void |
setValidate(boolean validate)
Sets whether the signature file should be validated or just opened.
|
protected RestPkiClient client
protected boolean validate
protected java.lang.String securityContextId
protected java.lang.String defaultSignaturePolicyId
protected SignaturePolicyCatalog acceptableExplicitPolicies
protected boolean ignoreRevocationStatusUnknown
protected boolean trustUncertifiedSigningTime
public SignatureExplorer2(RestPkiClient client)
client - the RestPkiClient which shall be used.public com.lacunasoftware.restpki.FileRef getSignatureFile()
public void setSignatureFile(java.lang.String path)
path - File path of the signature file to be signed.public void setSignatureFile(java.nio.file.Path path)
path - File path of the signature file to be opened.public void setSignatureFile(java.io.InputStream stream)
stream - a pre-opened InputStream linked to the PDF that will be signed. The stream is
NOT closed by this method.public void setSignatureFile(byte[] content)
content - Binary content of the signature file.public void setSignatureFile(BlobReference fileBlob)
fileBlob - blob referencepublic void setSignatureFile(FileResult fileResult)
fileResult - FileResult from previous call to Rest PKI.public boolean isValidate()
public void setValidate(boolean validate)
validate - Whether to validate the signature file or not.public java.lang.String getDefaultSignaturePolicyId()
public void setDefaultSignaturePolicy(SignaturePolicy signaturePolicy)
signaturePolicy - The default signature policy for validation. Depending on the policy,
it might also be necessary to set a security context.public SignaturePolicyCatalog getAcceptableExplicitPolicies()
public void setAcceptableExplicitPolicies(SignaturePolicyCatalog policyCatalog)
policyCatalog - The signature policy catalog (for instance,
SignaturePolicyCatalog.getPkiBrazilCades() or
SignaturePolicyCatalog.getPkiBrazilPades())public java.lang.String getSecurityContextId()
public void setSecurityContext(SecurityContext securityContext)
securityContext - The security context to be used to validate the signatures on the
signature file.public RestPkiClient getClient()
public void setClient(RestPkiClient client)
public void setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
ignoreRevocationStatusUnknown - The option of "IgnoreRevocationStatusUnknown".public boolean isTrustUncertifiedSigningTime()
public void setTrustUncertifiedSigningTime(boolean trustUncertifiedSigningTime)
protected com.lacunasoftware.restpki.OpenSignatureRequestModel fillRequest(com.lacunasoftware.restpki.OpenSignatureRequestModel request)
throws RestException,
java.io.IOException
RestExceptionjava.io.IOException