Class EPPPurpose

java.lang.Object
com.verisign.epp.codec.gen.EPPPurpose
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPPurpose extends Object implements EPPCodecComponent
The <purpose> element MUST contain one or more of the following child elements that describe the purposes for which data is collected:
  • <admin/>: Administrative purposes. Information can be used for administrative and technical support of the provisioning system.
  • <contact/>: Contact for marketing purposes. Information can be used to contact individuals, through a communications channel other than the protocol, for the promotion of a product or service.
  • <prov/>: Object provisioning purposes. Information can be used to identify objects and inter-object relationships.
  • <other/>: Other purposes. Information may be used in other ways not captured by the above definitions.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor
    EPPPurpose(boolean aAdmin, boolean aContact, boolean aOther, boolean aProv)
    Allocates a new EPPPurpose with different child elements based on the input parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPPurpose.
    void
    decode(Element aElement)
    decode EPPPurpose from a DOM element tree.
    encode(Document aDocument)
    encode EPPPurpose into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a EPPPurpose compare.
    Returns the XML namespace associated with the EPPCodecComponent.
    boolean
    <admin> element set?
    boolean
    <contact> element set?
    boolean
    <other> element set?
    boolean
    <prov> element set?
    void
    setAdmin(boolean aAdmin)
    Sets the <admin> element to specify contact for administrative purposes.
    void
    setContact(boolean aContact)
    Sets the <contact> element to specify contact for marketing purposes.
    void
    setOther(boolean aOther)
    Sets the <other> element to specify Other purposes.
    void
    setProv(boolean aProv)
    Sets the <prov> element to specify object provisioning purposes.
    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
  • Constructor Details

    • EPPPurpose

      public EPPPurpose()
      Default Constructor
    • EPPPurpose

      public EPPPurpose(boolean aAdmin, boolean aContact, boolean aOther, boolean aProv)
      Allocates a new EPPPurpose with different child elements based on the input parameters.
      Parameters:
      aAdmin - If set to true then the element admin is created
      aContact - If set to true then the element contact is created
      aOther - If set to true then the element other is created
      aProv - If set to true then the element prov is created
  • Method Details

    • isAdmin

      public boolean isAdmin()
      <admin> element set?
      Returns:
      true if is set; false otherwise.
    • setAdmin

      public void setAdmin(boolean aAdmin)
      Sets the <admin> element to specify contact for administrative purposes.
      Parameters:
      aAdmin - true to include the <admin> element; false otherwise.
    • isContact

      public boolean isContact()
      <contact> element set?
      Returns:
      true if is set; false otherwise.
    • setContact

      public void setContact(boolean aContact)
      Sets the <contact> element to specify contact for marketing purposes.
      Parameters:
      aContact - true to include the <contact> element; false otherwise.
    • isOther

      public boolean isOther()
      <other> element set?
      Returns:
      true if is set; false otherwise.
    • setOther

      public void setOther(boolean aOther)
      Sets the <other> element to specify Other purposes.
      Parameters:
      aOther - true to include the <other> element; false otherwise.
    • isProv

      public boolean isProv()
      <prov> element set?
      Returns:
      true if is set; false otherwise.
    • setProv

      public void setProv(boolean aProv)
      Sets the <prov> element to specify object provisioning purposes.
      Parameters:
      aProv - true to include the <prov> element; false otherwise.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPPurpose into a DOM element tree. The "purpose" element is created and the child nodes are appended as children.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOCUMENT ME!
      Returns:
      purpose root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPPurpose from a DOM element tree. The aElement argument needs to be the <purpose> element for a EPPPurpose
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - root element tree.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

      public boolean equals(Object aObject)
      implements a EPPPurpose compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPPurpose instance to compare with
      Returns:
      true if equal; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPPurpose.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPPurpose
      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.
    • getNamespace

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