/**
*
// * This is the value that will be signed by the Connector. // *
// */ // private String signed_text = null; /** * The signature object. */ private SignatureObject signature_object = null; private TextDataSource textDataSource = null; private int uiBlockEndPos = 0; public TextualSignatureHolder(String text, SignatureObject so) { //this.signed_text = text; this.signature_object = so; this.textDataSource = new TextDataSourceImpl(text); } public TextualSignatureHolder(TextDataSource text, SignatureObject so) { //this.signed_text = text; this.signature_object = so; this.textDataSource = text; } // /** // * @see at.knowcenter.wag.egov.egiz.pdf.SignatureHolder#getSignedText() // */ // public String getSignedText() // { // return this.signed_text; // } /** * @see at.knowcenter.wag.egov.egiz.pdf.SignatureHolder#getSignatureObject() */ public SignatureObject getSignatureObject() { return this.signature_object; } /** * @see at.knowcenter.wag.egov.egiz.pdf.SignatureHolder#getDataSource() */ public DataSource getDataSource() { return this.textDataSource; } /** * This is used to replace the DataSource. * ** After processing the text, data sources containing large texts are usually replaced by a FileBased ones to save memory. *
* * @param tds */ public void exchangeDataSource(TextDataSource tds) { this.textDataSource = tds; } /** * This is just a shortcut to getDataSource().getText() * @return Returns the text of this data source. */ public String getSignedText() { return this.textDataSource.getText(); } public int getUiBlockEndPos() { return this.uiBlockEndPos; } public void setUiBlockEndPos(int uiBlockEndPos) { this.uiBlockEndPos = uiBlockEndPos; } public static void mulitSetUiBlockEndPos(List signatureHolders, int uiBlockEndPos) { for (Iterator it = signatureHolders.iterator(); it.hasNext();) { SignatureHolder sh = (SignatureHolder) it.next(); trySetUiBlockEndPos(sh, uiBlockEndPos); } } public static void trySetUiBlockEndPos(SignatureHolder sh, int uiBlockEndPos ) { if (sh != null && sh instanceof TextualSignatureHolder) { ((TextualSignatureHolder)sh).setUiBlockEndPos(uiBlockEndPos); } } }