Class SignatureForm

  • All Implemented Interfaces:
    BorderProperties, GeneralProperties, NodeParser, com.inet.report.ReferenceHolder, SignatureProperties, java.io.Serializable, java.lang.Cloneable

    public class SignatureForm
    extends Element
    implements SignatureProperties, BorderProperties
    This class describes the visible Signature in PDF documents, that will be shown in Adobe Reader. The visible signature can consist of one, two or none of the standard elements (certificate details and subject name). With two standard elements the signature field will be divided into two parts (left and right). The same effect will be caused through setting the flag devideField even if only one standard element is present.
    Since:
    9.1
    See Also:
    Serialized Form
    • Field Detail

      • INSET_LEFT

        public static final int INSET_LEFT
        Distance from left boundary to text (inset)
        See Also:
        Constant Field Values
      • INSET_RIGHT

        public static final int INSET_RIGHT
        Minimal distance from right boundary to text (inset)
        See Also:
        Constant Field Values
      • INSET_TOP

        public static final int INSET_TOP
        Distance from top boundary to text (inset)
        See Also:
        Constant Field Values
      • INSET_BOTTOM

        public static final int INSET_BOTTOM
        Minimal distance from bottom boundary to text (inset)
        See Also:
        Constant Field Values
    • Method Detail

      • parseElement

        public NodeParser parseElement​(com.inet.report.parser.XMLTag group,
                                       java.lang.String tag,
                                       org.xml.sax.Attributes atts,
                                       java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                                throws FatalParserException
        FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

        Specified by:
        parseElement in interface NodeParser
        Overrides:
        parseElement in class Element
        Parameters:
        group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
        tag - The XMLTag to be parsed
        atts - The set of attributes in the current XMLTag
        parserMap - The map of current Parser.
        Returns:
        The NodeParser sub-element if one needed to be created, or null if none was created.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • getDivideField

        public boolean getDivideField()
        Returns the flag indicating whether the signature field must be divided into two parts.
        Specified by:
        getDivideField in interface SignatureProperties
        Returns:
        flag indicating if the signature field will be divided into two parts.
      • getShowSubjectName

        public boolean getShowSubjectName()
        Returns the flag indicating whether the subject common name must be written in a signature field. In this case this item will duplicate the item in certificate details.
        Specified by:
        getShowSubjectName in interface SignatureProperties
        Returns:
        flag indicating if the subject common name will be written in a signature field.
      • getTextPosition

        public int getTextPosition()
        Returns the position of text-items in the divided signature field: POSITION_LEFT, POSITION_RIGHT. If both certificate details and common name are present, this value describes the position of certificate details.
        Specified by:
        getTextPosition in interface SignatureProperties
        Returns:
        the position of text-items in the divided signature field.
      • getWriteCertificateDate

        public boolean getWriteCertificateDate()
        Returns the flag indicating whether the date of signing must be written in certificate details.
        Specified by:
        getWriteCertificateDate in interface SignatureProperties
        Returns:
        flag indicating if the date of signing will be written in certificate details.
      • getWriteCertificateDistinguishedName

        public boolean getWriteCertificateDistinguishedName()
        Returns the flag indicating whether the subject distinguished name must be written in certificate details.
        Specified by:
        getWriteCertificateDistinguishedName in interface SignatureProperties
        Returns:
        flag indicating if the subject distinguished name will be written in certificate details.
      • getWriteCertificateLabels

        public boolean getWriteCertificateLabels()
        Returns the flag indicating whether the labels of signature items must be written in certificate details.
        Specified by:
        getWriteCertificateLabels in interface SignatureProperties
        Returns:
        flag indicating if the labels of signature items will be written in certificate details.
      • getWriteCertificateLocation

        public boolean getWriteCertificateLocation()
        Returns the flag indicating whether the subject location must be written in certificate details.
        Specified by:
        getWriteCertificateLocation in interface SignatureProperties
        Returns:
        flag indicating if the subject location will be written in certificate details.
      • getWriteCertificateReason

        public boolean getWriteCertificateReason()
        Returns the flag indicating whether the reason of signing must be written in certificate details.
        Specified by:
        getWriteCertificateReason in interface SignatureProperties
        Returns:
        flag indicating if the reason of signing will be written in certificate details.
      • getWriteCertificateSubjectName

        public boolean getWriteCertificateSubjectName()
        Returns the flag indicating whether the subject common name must be written in certificate details.
        Specified by:
        getWriteCertificateSubjectName in interface SignatureProperties
        Returns:
        flag indicating if the subject common name will be written in certificate details.
      • setDivideField

        public void setDivideField​(boolean val)
        Sets the flag indicating that the signature field must be divided into two parts. At least one part must contains either certificate details items or subject common name. otherwise this flag must be set to false. If both certificate details and common name are present then this flag must be set to true.
        Specified by:
        setDivideField in interface SignatureProperties
        Parameters:
        val - if true the the signature field must be divided into two parts.
      • setShowSubjectName

        public void setShowSubjectName​(boolean val)
        Sets the flag indicating that the subject common name must be written in a signature field. In this case this item will duplicate the item in certificate details.
        Specified by:
        setShowSubjectName in interface SignatureProperties
        Parameters:
        val - if true the subject common name will be written in a signature fields.
      • setTextPosition

        public void setTextPosition​(int pos)
        Sets the position of text-items in the divided signature field: POSITION_LEFT, POSITION_RIGHT. If both certificate details and common name are present, this value describes the position of certificate details.
        Specified by:
        setTextPosition in interface SignatureProperties
        Parameters:
        pos - the position of text-items in the divided signature field.
      • setWriteCertificateDate

        public void setWriteCertificateDate​(boolean val)
        Sets the flag indicating that the date of signing must be written in certificate details.
        Specified by:
        setWriteCertificateDate in interface SignatureProperties
        Parameters:
        val - if true the date of signing will be written in certificate details.
      • setWriteCertificateDistinguishedName

        public void setWriteCertificateDistinguishedName​(boolean val)
        Sets the flag indicating that subject distinguished name must be written in certificate details.
        Specified by:
        setWriteCertificateDistinguishedName in interface SignatureProperties
        Parameters:
        val - if true the subject distinguished name will be written in certificate details.
      • setWriteCertificateLabels

        public void setWriteCertificateLabels​(boolean val)
        Sets the flag indicating that the labels of signature items must be written in certificate details.
        Specified by:
        setWriteCertificateLabels in interface SignatureProperties
        Parameters:
        val - if true the labels of signature items will be written in certificate details.
      • setWriteCertificateLocation

        public void setWriteCertificateLocation​(boolean val)
        Sets the flag indicating whether the subject location must be written in certificate details.
        Specified by:
        setWriteCertificateLocation in interface SignatureProperties
        Parameters:
        val - if true the subject location will be written in certificate details.
      • setWriteCertificateReason

        public void setWriteCertificateReason​(boolean val)
        Sets the flag indicating that the reason of signing must be written in certificate details.
        Specified by:
        setWriteCertificateReason in interface SignatureProperties
        Parameters:
        val - if true the reason of signing will be written in certificate details.
      • setWriteCertificateSubjectName

        public void setWriteCertificateSubjectName​(boolean val)
        Sets the flag indicating that subject common name must be written in certificate details.
        Specified by:
        setWriteCertificateSubjectName in interface SignatureProperties
        Parameters:
        val - if true the subject common name will be written in certificate details.
      • getSubComponents

        public java.util.List<? extends ReportComponent> getSubComponents()
        Returns all ReportComponents that are descendants of this one. E.G. this will return all Element of a Section. But it's as well useful for CrossTabs or Text elements which have additional elements.
        Specified by:
        getSubComponents in class ReportComponent
        Returns:
        a list with all sub components which can be empty as well; will be null if the component has no descendants