Class EPPLoginSecPolicyPassword

java.lang.Object
com.verisign.epp.codec.loginsecpolicy.v04.EPPLoginSecPolicyPassword
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPLoginSecPolicyPassword extends 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:
  • Field Details

  • Constructor Details

    • EPPLoginSecPolicyPassword

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

      public EPPLoginSecPolicyPassword(String aExpression)
      Constructor for EPPLoginSecPolicyPassword that takes the required expression attribute.
      Parameters:
      aExpression - The login password format regular expression.
    • EPPLoginSecPolicyPassword

      public EPPLoginSecPolicyPassword(String aExpression, String aLang, 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 Details

    • encode

      public Element encode(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(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(Object aObject)
      implements a deep EPPLoginSecPolicyPassword compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPLoginSecPolicyPassword instance to compare with
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPLoginSecPolicyPassword.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPLoginSecPolicyPassword
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getExpression

      public String getExpression()
      Gets the login password format regular expression.
      Returns:
      the expression if defined; null otherwise.
    • setExpression

      public void setExpression(String aExpression)
      Sets the login password format regular expression.
      Parameters:
      aExpression - the expression to set
    • getLang

      public 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(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 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(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 Boolean getSpecialRules()
      Get special rules flag.
      Returns:
      flag that indicates whether the password has special rules
    • setSpecialRules

      public void setSpecialRules(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 Boolean getRestrictedWords()
      Get restricted words flag.
      Returns:
      flag that indicates whether the password has restricted words
    • setRestrictedWords

      public void setRestrictedWords(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 String getRestrictedWordsUrl()
      Get restricted words url.
      Returns:
      url that defines the restricted words if defined; null otherwise.
    • setRestrictedWordsUrl

      public void setRestrictedWordsUrl(String aRestrictedWordsUrl)
      Set restricted words url.
      Parameters:
      aRestrictedWordsUrl - url that defines the restricted words. Set to null if undefined.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.