com.verisign.epp.codec.loginsecpolicy.v04

## Class EPPLoginSecPolicyPassword

- java.lang.Object
- - com.verisign.epp.codec.loginsecpolicy.v04.EPPLoginSecPolicyPassword

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

      public class EPPLoginSecPolicyPassword
      extends java.lang.Object
      implements EPPCodecComponent

  This class is encoded to the <loginSecPolicy:pw> element that represents the login password format policy. The <loginSecPolicy:pw> element contains the following child elements:
  - <loginSecPolicy:expression> - The login password format regular expression.
  - <oginSecPolicy:description> - The OPTIONAL human readable description of the login password format policy. The "lang" attribute MAY be present to identify the language of the description if the negotiated value is something other than the default value of "en" (English).
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTR_LANG` XML attribute name used for the OPTIONAL description `lang` attribute.
    `static java.lang.String` | `DEFAULT_LANG` Default Language -- English "en"
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPLoginSecPolicyPassword`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPLoginSecPolicyPassword`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPLoginSecPolicyPassword()` Default constructor for `EPPLoginSecPolicyPassword`.
    `EPPLoginSecPolicyPassword(java.lang.String aExpression)` Constructor for `EPPLoginSecPolicyPassword` that takes the required expression attribute.
    `EPPLoginSecPolicyPassword(java.lang.String aExpression, java.lang.String aLang, java.lang.String aDescription)` Constructor for `EPPLoginSecPolicyPassword` that takes all attributes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPLoginSecPolicyPassword`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPLoginSecPolicyPassword` attributes from the aElement DOM Element tree.
    `org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` Encode a DOM Element tree from the attributes of the `EPPLoginSecPolicyPassword` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPLoginSecPolicyPassword` compare.
    `java.lang.String` | `getDescription()` Gets the status description, which is free form text describing the rationale for the status.
    `java.lang.String` | `getExpression()` Gets the login password format regular expression.
    `java.lang.String` | `getLang()` Gets the language of the status description with the default set to `DEFAULT_LANG`.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.lang.Boolean` | `getRestrictedWords()` Get restricted words flag.
    `java.lang.String` | `getRestrictedWordsUrl()` Get restricted words url.
    `java.lang.Boolean` | `getSpecialRules()` Get special rules flag.
    `boolean` | `hasDescription()` Is the description defined?
    `boolean` | `hasRestrictedWords()` Is the restricted words flag defined?
    `boolean` | `hasRestrictedWordsUrl()` Is the restricted words url defined?
    `boolean` | `hasSpecialRules()` Is the special rules flag defined?
    `void` | `setDescription(java.lang.String aDesc)` Sets the status description, which is free form text describing the rationale for the status.
    `void` | `setExpression(java.lang.String aExpression)` Sets the login password format regular expression.
    `void` | `setLang(java.lang.String aLang)` Sets the language of the status description with the default set to `DEFAULT_LANG`.
    `void` | `setRestrictedWords(java.lang.Boolean aRestrictedWords)` Set restricted words flag.
    `void` | `setRestrictedWordsUrl(java.lang.String aRestrictedWordsUrl)` Set restricted words url.
    `void` | `setSpecialRules(java.lang.Boolean aSpecialRules)` Set special rules flag.
    `java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

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

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      XML local name for `EPPLoginSecPolicyPassword`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPLoginSecPolicyPassword`.
      See Also:
        Constant Field Values

    - #### DEFAULT_LANG

          public static final java.lang.String DEFAULT_LANG

      Default Language -- English "en"
      See Also:
        Constant Field Values

    - #### ATTR_LANG

          public static final java.lang.String ATTR_LANG

      XML attribute name used for the OPTIONAL description `lang` attribute.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPLoginSecPolicyPassword

          public EPPLoginSecPolicyPassword()

      Default constructor for `EPPLoginSecPolicyPassword`. The expression must be set prior to calling `encode(Document)`.

    - #### EPPLoginSecPolicyPassword

          public EPPLoginSecPolicyPassword(java.lang.String aExpression)

      Constructor for `EPPLoginSecPolicyPassword` that takes the required expression attribute.
      Parameters:
        `aExpression` - The login password format regular expression.

    - #### EPPLoginSecPolicyPassword

          public EPPLoginSecPolicyPassword(java.lang.String aExpression,
                                           java.lang.String aLang,
                                           java.lang.String aDescription)

      Constructor for `EPPLoginSecPolicyPassword` that takes all attributes.
      Parameters:
        `aExpression` - The login password format regular expression.
        `aLang` - OPTIONAL language of the description with a default of `DEFAULT_LANG`. Set to `DEFAULT_LANG` or `null` to use the default value.
        `aDescription` - Description of the password policy

  - ### Method Detail

    - #### encode

          public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

      Encode a DOM Element tree from the attributes of the `EPPLoginSecPolicyPassword` instance.
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Parameters:
        `aDocument` - DOM Document that is being built. Used as an Element factory.
      Returns:
        Element Root DOM Element representing the `EPPLoginSecPolicyPassword` instance.
      Throws:
        `EPPEncodeException` - - Unable to encode `EPPLoginSecPolicyPassword` instance.

    - #### decode

          public void decode(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPLoginSecPolicyPassword` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPLoginSecPolicyPassword` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPLoginSecPolicyPassword` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPLoginSecPolicyPassword` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPLoginSecPolicyPassword`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPLoginSecPolicyPassword`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### toString

          public java.lang.String toString()

      Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getExpression

          public java.lang.String getExpression()

      Gets the login password format regular expression.
      Returns:
        the expression if defined; `null` otherwise.

    - #### setExpression

          public void setExpression(java.lang.String aExpression)

      Sets the login password format regular expression.
      Parameters:
        `aExpression` - the expression to set

    - #### getLang

          public java.lang.String getLang()

      Gets the language of the status description with the default set to `DEFAULT_LANG`.
      Returns:
        Language of description with the default value of `DEFAULT_LANG`.

    - #### setLang

          public void setLang(java.lang.String aLang)

      Sets the language of the status description with the default set to `DEFAULT_LANG`.
      Parameters:
        `aLang` - Language of description. If set to `null`, the value will be set to the default of `DEFAULT_LANG`.

    - #### hasDescription

          public boolean hasDescription()

      Is the description defined?
      Returns:
        `true` if the description is defined; `false` otherwise.

    - #### getDescription

          public java.lang.String getDescription()

      Gets the status description, which is free form text describing the rationale for the status.
      Returns:
        Status description if defined; `null` otherwise.

    - #### setDescription

          public void setDescription(java.lang.String aDesc)

      Sets the status description, which is free form text describing the rationale for the status.
      Parameters:
        `aDesc` - Status description. Set to `null` if undefined.

    - #### hasSpecialRules

          public boolean hasSpecialRules()

      Is the special rules flag defined?
      Returns:
        `true` if the special rules flag is defined; `false` otherwise.

    - #### getSpecialRules

          public java.lang.Boolean getSpecialRules()

      Get special rules flag.
      Returns:
        flag that indicates whether the password has special rules

    - #### setSpecialRules

          public void setSpecialRules(java.lang.Boolean aSpecialRules)

      Set special rules flag.
      Parameters:
        `aSpecialRules` - flag that indicates whether the password has special rules

    - #### hasRestrictedWords

          public boolean hasRestrictedWords()

      Is the restricted words flag defined?
      Returns:
        `true` if the restricted words flag is defined; `false` otherwise.

    - #### getRestrictedWords

          public java.lang.Boolean getRestrictedWords()

      Get restricted words flag.
      Returns:
        flag that indicates whether the password has restricted words

    - #### setRestrictedWords

          public void setRestrictedWords(java.lang.Boolean aRestrictedWords)

      Set restricted words flag.
      Parameters:
        `aRestrictedWords` - flag that indicates whether the password has restricted words

    - #### hasRestrictedWordsUrl

          public boolean hasRestrictedWordsUrl()

      Is the restricted words url defined?
      Returns:
        `true` if the restricted words url is defined; `false` otherwise.

    - #### getRestrictedWordsUrl

          public java.lang.String getRestrictedWordsUrl()

      Get restricted words url.
      Returns:
        url that defines the restricted words if defined; `null` otherwise.

    - #### setRestrictedWordsUrl

          public void setRestrictedWordsUrl(java.lang.String aRestrictedWordsUrl)

      Set restricted words url.
      Parameters:
        `aRestrictedWordsUrl` - url that defines the restricted words. Set to `null` if undefined.

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.