lv.pasts.eme.edoc

## Class SignatureType

- java.lang.Object
- - lv.pasts.eme.edoc.SignatureType

-     public final class SignatureType
      extends Object

  A `SignatureType` class represents the EDOC signature type.

  An application must specify the signature type when creating an EDOC signature. Available signature propeties can be accessed using the `getProperties()` method.

  See Also:
    `EDOCSignature.getSignatureType()`, `SignatureTypeList.getSignatureTypes()`, `EDOCTemplate.getDefaultSignatureType()`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `SIGNATURE_LEVEL_BASIC` Basic signature level.
    `static int` | `SIGNATURE_LEVEL_TIMESTAMPED` Timestamped signature level.
    `static int` | `SIGNATURE_LEVEL_VERIFIED` Verified signature level.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Returns the name of this SignatureType.
    `EDOCProperties` | `getProperties()` Returns signature properties specified by this signature type, ot `null` if no properties are defined.
    `int` | `getSignatureLevel()` Returns the current signature level, or `-1` if the current level is not set.
    `boolean` | `isBasicSigAllowed()` Returns true if this signature type allows basic signature.
    `boolean` | `isReadonly()` Returns true if this `SignatureType` instance is readonly.
    `boolean` | `isSimpleSignatureType()` Returns true if this is a simple signature type.
    `boolean` | `isTimestampedSigAllowed()` Returns true if this signature type allows timestamped signature.
    `boolean` | `isVerifiedSigAllowed()` Returns true if this signature type allows verified signature.
    `void` | `prepareForSignature()`
    `void` | `setSignatureLevel(int signatureLevel)` Sets the current signature level.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SIGNATURE_LEVEL_BASIC

          public static final int SIGNATURE_LEVEL_BASIC

      Basic signature level.
      See Also:
        Constant Field Values

    - #### SIGNATURE_LEVEL_TIMESTAMPED

          public static final int SIGNATURE_LEVEL_TIMESTAMPED

      Timestamped signature level.
      See Also:
        Constant Field Values

    - #### SIGNATURE_LEVEL_VERIFIED

          public static final int SIGNATURE_LEVEL_VERIFIED

      Verified signature level.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getName

          public String getName()

      Returns the name of this SignatureType.
      Returns:
        the name (never null).

    - #### isSimpleSignatureType

          public boolean isSimpleSignatureType()

      Returns true if this is a simple signature type.
      Returns:
        true if this is a simple signature type.

    - #### isBasicSigAllowed

          public boolean isBasicSigAllowed()

      Returns true if this signature type allows basic signature.
      Returns:
        true if this signature type allows basic signature.

    - #### isTimestampedSigAllowed

          public boolean isTimestampedSigAllowed()

      Returns true if this signature type allows timestamped signature.
      Returns:
        true if this signature type allows timestamped signature.

    - #### isVerifiedSigAllowed

          public boolean isVerifiedSigAllowed()

      Returns true if this signature type allows verified signature.
      Returns:
        true if this signature type allows verified signature.

    - #### getProperties

          public EDOCProperties getProperties()

      Returns signature properties specified by this signature type, ot `null` if no properties are defined.
      Returns:
        the `EDOCProperties` object containing signature properties.

    - #### getSignatureLevel

          public int getSignatureLevel()

      Returns the current signature level, or `-1` if the current level is not set.
      Returns:
        the current signature level.

    - #### setSignatureLevel

          public void setSignatureLevel(int signatureLevel)
                                 throws EDOCException

      Sets the current signature level.
      Parameters:
        `signatureLevel` - the signature level.
      Throws:
        `EDOCException` - if signature level is not allowed.

    - #### isReadonly

          public boolean isReadonly()

      Returns true if this `SignatureType` instance is readonly. Instance is readonly when obtained from an existing `EDOCSignature`.
      Returns:
        true if this instance is readonly.
      Since:
        2.1.0

    - #### prepareForSignature

          public void prepareForSignature()
                                   throws EDOCException

      Throws:
        `EDOCException`

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO