com.groupdocs.signature.domain.signatures.metadata

Class MetadataSignature

    • Constructor Detail

      • MetadataSignature

        protected MetadataSignature(String name)

        Creates Metadata Signature with predefined name and empty value

        Parameters:
        name - Metadata name
      • MetadataSignature

        protected MetadataSignature(String name,
                         Object value)

        Creates Metadata Signature with predefined values

        Parameters:
        name - Name of Metadata signature object
        value - Value of Metadata signature
    • Method Detail

      • deepClone

        public Object deepClone()

        Clone Metadata Signature instance.

        Specified by:
        deepClone in interface com.aspose.ms.System.ICloneable
        Overrides:
        deepClone in class BaseSignature
        Returns:
        Returns cloned Metadata Signature instance
      • deepClone

        public MetadataSignature deepClone(Object value)

        Clone Metadata Signature instance with given value.

        Parameters:
        value - Value for new cloned object.
        Returns:
        Returns cloned Metadata Signature instance with given value.
      • equals

        public boolean equals(Object signature)

        Overwrites Equals method to compare signature properties

        Overrides:
        equals in class BaseSignature
        Parameters:
        signature - Signature object to compare with.
        Returns:
        Returns true if passed signature object has same type and all its properties are equal to this instance properties.
      • getData

        public final <T> T getData(Class<T> typeOfT)

        Obtain object from Metadata Signature Value over deserialization.

        Returns:
        Instance of T object

        T: Type of object to deserialize from Metadata value

      • getData

        public final <T> T getData(Class<T> typeOfT,
                    IDataEncryption dataEncryption)

        Obtain object from Metadata Signature Text over deserialization.

        Parameters:
        dataEncryption - Set custom data encryption implementation

        T: Type of object to deserialize from Metadata Value

        Returns:
      • getDataEncryption

        public final IDataEncryption getDataEncryption()

        Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties.

      • getFValue

        protected final Object getFValue()

        Protected Metadata object value

      • getName

        public final String getName()

        Specifies unique metadata name.

      • getType

        public final int getType()

        Specifies metadata value type.

      • getValue

        public final Object getValue()

        Specifies metadata object.

      • hashCode

        public int hashCode()

        Overrides GetHashCode method

        Overrides:
        hashCode in class BaseSignature
        Returns:
        Signature hash code
      • setDataEncryption

        public final void setDataEncryption(IDataEncryption value)

        Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties.

      • setFValue

        protected final void setFValue(Object value)

        Protected Metadata object value

      • setName

        public final void setName(String value)

        Specifies unique metadata name.

      • setType

        public final void setType(int value)

        Specifies metadata value type.

      • setValue

        public final void setValue(Object value)

        Specifies metadata object.

      • SetValue

        protected void SetValue(Object value)

        Implements virtual method of setting value into metadata signature

        Parameters:
        value - Given metadata value
      • toBoolean

        public boolean toBoolean()

        Converts to boolean.

        Returns:
        Returns the Metadata signature value as boolean.


        Throws an exception if the Metadata value could not be converted.
      • toDateTime

        public Date toDateTime()

        Converts to DateTime.

        Returns:
        Returns the Metadata Signature value as DateTime.


        Throws an exception if the Metadata value could not be converted. If original value is string based the default culture property info will be used from SignatureSettings properties SignatureSettings.DefaultCulture
      • toDateTime

        public Date toDateTime(Locale provider)

        Converts to DateTime.

        Parameters:
        provider - Format data provider to use with data conversion operations.


        Throws an exception if the Metadata value could not be converted
        Returns:
        Returns the Metadata Signature value as DateTime.
      • toDouble

        public double toDouble()

        Converts to Double.

        Returns:
        Returns the Metadata Signature value as Double.


        Throws an exception if the Metadata value could not be converted. If original value is string based the default culture property info will be used from SignatureSettings properties SignatureSettings.DefaultCulture
      • toDouble

        public double toDouble(Locale provider)

        Converts to Double.

        Parameters:
        provider - Format data provider to use with data conversion operations.


        Throws an exception if the Metadata value could not be converted
        Returns:
        Returns the Metadata Signature value as Double.
      • toInteger

        public int toInteger()

        Converts to integer.

        Returns:
        Returns the Metadata Signature value as integer.


        Throws an exception if the Metadata value could not be converted.
      • toString

        public String toString()

        Converts to String with override ToString() method

        Overrides:
        toString in class BaseSignature
        Returns:
        Returns the Metadata Signature value as String.


        Converts a boolean property into "True" or "False". For another data type the default data format provider will be used.
      • toString

        public String toString(String format)

        Converts to String with specified format

        Parameters:
        format - Data format string.


        Converts a boolean property into "True" or "False". Default culture property info will be used from SignatureSettings properties SignatureSettings.DefaultCulture
        Returns:
        Returns the Metadata Signature value as String.
      • toString

        public String toString(String format,
                      Locale provider)

        Converts to String with specified format

        Parameters:
        format - Data format string.
        provider - Format data provider to use with data conversion operations.


        Converts a boolean property into "True" or "False".
        Returns:
        Returns the Metadata Signature value as String.