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 Modifier and Type Field Description static String
MS_DIGSIG_NS
static String
OO_DIGSIG_NS
static String
XADES_132_NS
static String
XADES_141_NS
static String
XML_DIGSIG_NS
static String
XML_NS
-
Constructor Summary
Constructors Constructor Description SignatureFacet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Reference
newReference(String uri, List<Transform> transforms, String type, String id, byte[] digestValue, SignatureConfig signatureConfig)
void
postSign(Document document)
This method is being invoked by the XML signature service engine during the post-sign phase.void
preSign(Document document, List<Reference> references, List<XMLObject> objects)
This method is being invoked by the XML signature service engine during pre-sign phase.void
setSignatureConfig(SignatureConfig signatureConfig)
-
-
-
Field Detail
-
XML_NS
public static final String XML_NS
- See Also:
- Constant Field Values
-
XML_DIGSIG_NS
public static final String XML_DIGSIG_NS
- See Also:
- Constant Field Values
-
OO_DIGSIG_NS
public static final String OO_DIGSIG_NS
- See Also:
- Constant Field Values
-
MS_DIGSIG_NS
public static final String MS_DIGSIG_NS
- See Also:
- Constant Field Values
-
XADES_132_NS
public static final String XADES_132_NS
- See Also:
- Constant Field Values
-
XADES_141_NS
public static final String XADES_141_NS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSignatureConfig
public void setSignatureConfig(SignatureConfig signatureConfig)
- Specified by:
setSignatureConfig
in 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
public void postSign(Document document) throws MarshalException
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
-
newReference
public static Reference newReference(String uri, List<Transform> transforms, String type, String id, byte[] digestValue, SignatureConfig signatureConfig) throws XMLSignatureException
- Throws:
XMLSignatureException
-
-