Class SignatureFacet
java.lang.Object
org.apache.poi.poifs.crypt.dsig.facets.SignatureFacet
- All Implemented Interfaces:
SignatureConfig.SignatureConfigurable
- Direct Known Subclasses:
EnvelopedSignatureFacet,KeyInfoSignatureFacet,Office2010SignatureFacet,OOXMLSignatureFacet,XAdESSignatureFacet,XAdESXLSignatureFacet
public abstract class SignatureFacet
extends Object
implements SignatureConfig.SignatureConfigurable
JSR105 Signature Facet base class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected XMLSignatureFactoryprotected Referencestatic ReferencenewReference(String uri, List<Transform> transforms, String type, String id, byte[] digestValue, SignatureConfig signatureConfig) protected TransformnewTransform(String canonicalizationMethod) protected TransformnewTransform(String canonicalizationMethod, TransformParameterSpec paramSpec) voidThis method is being invoked by the XML signature service engine during the post-sign phase.voidThis method is being invoked by the XML signature service engine during pre-sign phase.voidsetSignatureConfig(SignatureConfig signatureConfig)
-
Field Details
-
XML_NS
- See Also:
-
XML_DIGSIG_NS
- See Also:
-
OO_DIGSIG_NS
- See Also:
-
MS_DIGSIG_NS
- See Also:
-
XADES_132_NS
- See Also:
-
XADES_141_NS
- See Also:
-
signatureConfig
-
-
Constructor Details
-
SignatureFacet
public SignatureFacet()
-
-
Method Details
-
setSignatureConfig
- Specified by:
setSignatureConfigin interfaceSignatureConfig.SignatureConfigurable
-
preSign
public void preSign(Document document, List<Reference> references, List<XMLObject> objects) throws XMLSignatureException This method is being invoked by the XML signature service engine during pre-sign phase. Via this method a signature facet implementation can add signature facets to an XML signature.- Parameters:
document- the signature document to be used for importsreferences- list of reference definitionsobjects- objects to be signed/included in the signature document- Throws:
XMLSignatureException
-
postSign
This method is being invoked by the XML signature service engine during the post-sign phase. Via this method a signature facet can extend the XML signatures with for example key information.- Parameters:
document- the signature document to be modified- Throws:
MarshalException
-
getSignatureFactory
-
newTransform
- Throws:
XMLSignatureException
-
newTransform
protected Transform newTransform(String canonicalizationMethod, TransformParameterSpec paramSpec) throws XMLSignatureException - Throws:
XMLSignatureException
-
newReference
protected Reference newReference(String uri, List<Transform> transforms, String type, String id, byte[] digestValue) throws XMLSignatureException - Throws:
XMLSignatureException
-
newReference
public static Reference newReference(String uri, List<Transform> transforms, String type, String id, byte[] digestValue, SignatureConfig signatureConfig) throws XMLSignatureException - Throws:
XMLSignatureException
-