public abstract class XmlSignatureStarter extends SignatureStarter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
signatureElementId |
protected com.lacunasoftware.restpki.XmlElementLocationModel |
signatureElementLocation |
protected byte[] |
xml |
callbackArgument, certificate, certificateInfo, client, done, securityContextId, signaturePolicyId
Constructor and Description |
---|
XmlSignatureStarter(RestPkiClient client)
Create a new instance using the given RestPkiClient.
|
Modifier and Type | Method and Description |
---|---|
void |
setSignatureElementId(java.lang.String id)
Sets the computed signature element ID
|
void |
setSignatureElementLocation(java.lang.String xpath,
XmlNamespaceManager nsm,
XmlInsertionOptions insertionOption)
Sets the location of the computed signature element to be inserted in the XML document
|
void |
setXml(byte[] content)
Sets the XML document bytes
|
void |
setXml(java.io.InputStream stream)
Sets the XML document stream
|
void |
setXml(java.nio.file.Path path)
Sets the XML document path
|
void |
setXml(java.lang.String path)
Sets the XML document path
|
getCertificateInfo, setCallbackArgument, setSecurityContext, setSignaturePolicy, setSignerCertificate, start, startWithWebPki
protected byte[] xml
protected java.lang.String signatureElementId
protected com.lacunasoftware.restpki.XmlElementLocationModel signatureElementLocation
public XmlSignatureStarter(RestPkiClient client)
client
- the RestPkiClient which shall be used.public void setXml(byte[] content)
content
- public void setXml(java.io.InputStream stream) throws java.io.IOException
stream
- java.io.IOException
public void setXml(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public void setXml(java.nio.file.Path path) throws java.io.IOException
path
- java.io.IOException
public void setSignatureElementId(java.lang.String id)
id
- public void setSignatureElementLocation(java.lang.String xpath, XmlNamespaceManager nsm, XmlInsertionOptions insertionOption)
xpath
- The xpath to select the target element which the insertion will be related to. If null, XML root element will be selected.nsm
- The namespaces and prefixes of the XML used in the xpathinsertionOption
- The insertion option that will be applied over the target element define by xpath