Package org.apache.poi.poifs.crypt.dsig
Class SignatureLine
java.lang.Object
org.apache.poi.poifs.crypt.dsig.SignatureLine
- Direct Known Subclasses:
XSSFSignatureLine,XWPFSignatureLine
Base class for SignatureLines (XSSF,XWPF only)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe default captionbyte[]the plain signature without captioncom.microsoft.schemas.vml.CTShapevoidsetAllowComments(Boolean allowComments) voidsetCaption(String caption) Set the caption - use maximum of three lines separated by "\n".voidsetContentType(String contentType) voidsetInvalidStamp(String invalidStamp) Sets the text stamped over the signature image when the document got tampered withvoidsetPlainSignature(byte[] plainSignature) Sets the plain signature supported formats are PNG,GIF,JPEG,(SVG),EMF,WMF.voidsetSetupId(ClassID setupId) voidsetSignatureShape(com.microsoft.schemas.office.office.CTSignatureLine signatureLine) voidsetSignatureShape(com.microsoft.schemas.vml.CTShape signatureShape) voidsetSigningInstructions(String signingInstructions) voidsetSuggestedSigner(String suggestedSigner) voidsetSuggestedSigner2(String suggestedSigner2) voidsetSuggestedSignerEmail(String suggestedSignerEmail) voidupdateSignatureConfig(SignatureConfig config)
-
Constructor Details
-
SignatureLine
public SignatureLine()
-
-
Method Details
-
getSetupId
-
setSetupId
-
getAllowComments
-
setAllowComments
-
getSigningInstructions
-
setSigningInstructions
-
getSuggestedSigner
-
setSuggestedSigner
-
getSuggestedSigner2
-
setSuggestedSigner2
-
getSuggestedSignerEmail
-
setSuggestedSignerEmail
-
getDefaultCaption
The default caption- Returns:
- "[suggestedSigner] \n [suggestedSigner2] \n [suggestedSignerEmail]"
-
getCaption
-
setCaption
Set the caption - use maximum of three lines separated by "\n". Defaults togetDefaultCaption()- Parameters:
caption- the signature caption
-
getInvalidStamp
-
setInvalidStamp
Sets the text stamped over the signature image when the document got tampered with- Parameters:
invalidStamp- the invalid stamp text
-
getPlainSignature
public byte[] getPlainSignature()the plain signature without caption -
setPlainSignature
public void setPlainSignature(byte[] plainSignature) Sets the plain signature supported formats are PNG,GIF,JPEG,(SVG),EMF,WMF. for SVG,EMF,WMF poi-scratchpad needs to be in the class-/modulepath- Parameters:
plainSignature- the plain signature - ifnull, the signature is not rendered and only the caption is visible
-
getContentType
-
setContentType
-
getSignatureShape
public com.microsoft.schemas.vml.CTShape getSignatureShape() -
setSignatureShape
public void setSignatureShape(com.microsoft.schemas.vml.CTShape signatureShape) -
setSignatureShape
public void setSignatureShape(com.microsoft.schemas.office.office.CTSignatureLine signatureLine) -
updateSignatureConfig
- Throws:
IOException
-