MetadataSignature
Inheritance: java.lang.Object, com.groupdocs.signature.domain.signatures.BaseSignature
public abstract class MetadataSignature extends BaseSignature
Contains Metadata signature properties.
Methods
Method | Description |
---|---|
getName() | Specifies unique metadata name. |
setName(String value) | Specifies unique metadata name. |
getValue() | Specifies metadata object. |
setValue(Object value) | Specifies metadata object. |
getType() | Specifies metadata value type. |
setType(int value) | Specifies metadata value type. |
getDataEncryption() | Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties. |
setDataEncryption(IDataEncryption value) | Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties. |
Obtain object from Metadata Signature Value over deserialization. | |
Obtain object from Metadata Signature Text over deserialization. | |
equals(Object signature) | Overwrites Equals method to compare signature properties |
hashCode() | Overrides GetHashCode method |
toBoolean() | Converts to boolean. |
toInteger() | Converts to integer. |
toDouble() | Converts to Double. |
toDouble(Locale provider) | Converts to Double. |
toSingle() | Converts to float. |
toSingle(Locale provider) | Converts to float. |
toDateTime() | Converts to DateTime. |
toDateTime(Locale provider) | Converts to DateTime. |
toString() | Converts to String with override ToString() method |
toString(String format) | Converts to String with specified format |
toString(String format, Locale provider) | Converts to String with specified format |
deepClone() | Clone Metadata Signature instance. |
deepClone(Object value) | Clone Metadata Signature instance with given value. |
getName()
public final String getName()
Specifies unique metadata name.
Returns: java.lang.String
setName(String value)
public final void setName(String value)
Specifies unique metadata name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
getValue()
public final Object getValue()
Specifies metadata object.
Returns: java.lang.Object
setValue(Object value)
public final void setValue(Object value)
Specifies metadata object.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Object |
getType()
public final int getType()
Specifies metadata value type.
Returns: int
setType(int value)
public final void setType(int value)
Specifies metadata value type.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
getDataEncryption()
public final IDataEncryption getDataEncryption()
Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties.
Returns: IDataEncryption
setDataEncryption(IDataEncryption value)
public final void setDataEncryption(IDataEncryption value)
Gets or sets implementation of IDataEncryption interface to encode and decode signature Value properties.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IDataEncryption |
getData(Class typeOfT)
public final T <T>getData(Class<T> typeOfT)
Obtain object from Metadata Signature Value over deserialization.
Parameters:
Parameter | Type | Description |
---|---|---|
typeOfT | java.lang.Class |
Returns: T - Instance of T object
T : Type of object to deserialize from Metadata value
getData(Class typeOfT, IDataEncryption dataEncryption)
public final T <T>getData(Class<T> typeOfT, IDataEncryption dataEncryption)
Obtain object from Metadata Signature Text over deserialization.
Parameters:
Parameter | Type | Description |
---|---|---|
typeOfT | java.lang.Class |
|
dataEncryption | IDataEncryption | Set custom data encryption implementation |
T : Type of object to deserialize from Metadata Value |
Returns: T -
equals(Object signature)
public boolean equals(Object signature)
Overwrites Equals method to compare signature properties
Parameters:
Parameter | Type | Description |
---|---|---|
signature | java.lang.Object | Signature object to compare with. |
Returns: boolean - Returns true if passed signature object has same type and all its properties are equal to this instance properties.
hashCode()
public int hashCode()
Overrides GetHashCode method
Returns: int - Signature hash code
toBoolean()
public boolean toBoolean()
Converts to boolean.
Returns: boolean - Returns the Metadata signature value as boolean.
Throws an exception if the Metadata value could not be converted.
toInteger()
public int toInteger()
Converts to integer.
Returns: int - Returns the Metadata Signature value as integer.
Throws an exception if the Metadata value could not be converted.
toDouble()
public double toDouble()
Converts to Double.
Returns: double - 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(Locale provider)
public double toDouble(Locale provider)
Converts to Double.
Parameters:
Parameter | Type | Description |
---|---|---|
provider | java.util.Locale | Format data provider to use with data conversion operations. |
Throws an exception if the Metadata value could not be converted |
Returns: double - Returns the Metadata Signature value as Double.
toSingle()
public float toSingle()
Converts to float.
Returns: float - Returns the Metadata Signature value as float.
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 ()
toSingle(Locale provider)
public float toSingle(Locale provider)
Converts to float.
Parameters:
Parameter | Type | Description |
---|---|---|
provider | java.util.Locale | Format data provider to use with data conversion operations. |
Throws an exception if the Metadata value could not be converted |
Returns: float - Returns the Metadata Signature value as float.
toDateTime()
public Date toDateTime()
Converts to DateTime.
Returns: java.util.Date - 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(Locale provider)
public Date toDateTime(Locale provider)
Converts to DateTime.
Parameters:
Parameter | Type | Description |
---|---|---|
provider | java.util.Locale | Format data provider to use with data conversion operations. |
Throws an exception if the Metadata value could not be converted |
Returns: java.util.Date - Returns the Metadata Signature value as DateTime.
toString()
public String toString()
Converts to String with override ToString() method
Returns: java.lang.String - 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(String format)
public String toString(String format)
Converts to String with specified format
Parameters:
Parameter | Type | Description |
---|---|---|
format | java.lang.String | Data format string. |
Converts a boolean property into “True” or “False”. Default culture property info will be used from SignatureSettings properties SignatureSettings.DefaultCulture |
Returns: java.lang.String - Returns the Metadata Signature value as String.
toString(String format, Locale provider)
public String toString(String format, Locale provider)
Converts to String with specified format
Parameters:
Parameter | Type | Description |
---|---|---|
format | java.lang.String | Data format string. |
provider | java.util.Locale | Format data provider to use with data conversion operations. |
Converts a boolean property into “True” or “False”. |
Returns: java.lang.String - Returns the Metadata Signature value as String.
deepClone()
public Object deepClone()
Clone Metadata Signature instance.
Returns: java.lang.Object - Returns cloned Metadata Signature instance
deepClone(Object value)
public MetadataSignature deepClone(Object value)
Clone Metadata Signature instance with given value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Object | Value for new cloned object. |
Returns: MetadataSignature - Returns cloned Metadata Signature instance with given value.