Package org.apache.poi.poifs.crypt.dsig
Class SignatureLine
- java.lang.Object
-
- org.apache.poi.poifs.crypt.dsig.SignatureLine
-
- Direct Known Subclasses:
XSSFSignatureLine,XWPFSignatureLine
public abstract class SignatureLine extends java.lang.ObjectBase class for SignatureLines (XSSF,XWPF only)
-
-
Constructor Summary
Constructors Constructor Description SignatureLine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleangetAllowComments()java.lang.StringgetCaption()java.lang.StringgetContentType()java.lang.StringgetDefaultCaption()The default captionjava.lang.StringgetInvalidStamp()byte[]getPlainSignature()the plain signature without captionClassIDgetSetupId()com.microsoft.schemas.vml.CTShapegetSignatureShape()java.lang.StringgetSigningInstructions()java.lang.StringgetSuggestedSigner()java.lang.StringgetSuggestedSigner2()java.lang.StringgetSuggestedSignerEmail()voidsetAllowComments(java.lang.Boolean allowComments)voidsetCaption(java.lang.String caption)Set the caption - use maximum of three lines separated by "\n".voidsetContentType(java.lang.String contentType)voidsetInvalidStamp(java.lang.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(java.lang.String signingInstructions)voidsetSuggestedSigner(java.lang.String suggestedSigner)voidsetSuggestedSigner2(java.lang.String suggestedSigner2)voidsetSuggestedSignerEmail(java.lang.String suggestedSignerEmail)voidupdateSignatureConfig(SignatureConfig config)
-
-
-
Method Detail
-
getSetupId
public ClassID getSetupId()
-
setSetupId
public void setSetupId(ClassID setupId)
-
getAllowComments
public java.lang.Boolean getAllowComments()
-
setAllowComments
public void setAllowComments(java.lang.Boolean allowComments)
-
getSigningInstructions
public java.lang.String getSigningInstructions()
-
setSigningInstructions
public void setSigningInstructions(java.lang.String signingInstructions)
-
getSuggestedSigner
public java.lang.String getSuggestedSigner()
-
setSuggestedSigner
public void setSuggestedSigner(java.lang.String suggestedSigner)
-
getSuggestedSigner2
public java.lang.String getSuggestedSigner2()
-
setSuggestedSigner2
public void setSuggestedSigner2(java.lang.String suggestedSigner2)
-
getSuggestedSignerEmail
public java.lang.String getSuggestedSignerEmail()
-
setSuggestedSignerEmail
public void setSuggestedSignerEmail(java.lang.String suggestedSignerEmail)
-
getDefaultCaption
public java.lang.String getDefaultCaption()
The default caption- Returns:
- "[suggestedSigner] \n [suggestedSigner2] \n [suggestedSignerEmail]"
-
getCaption
public java.lang.String getCaption()
-
setCaption
public void setCaption(java.lang.String caption)
Set the caption - use maximum of three lines separated by "\n". Defaults togetDefaultCaption()- Parameters:
caption- the signature caption
-
getInvalidStamp
public java.lang.String getInvalidStamp()
-
setInvalidStamp
public void setInvalidStamp(java.lang.String invalidStamp)
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
public java.lang.String getContentType()
-
setContentType
public void setContentType(java.lang.String contentType)
-
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
public void updateSignatureConfig(SignatureConfig config) throws java.io.IOException
- Throws:
java.io.IOException
-
-