Class EPPRecipient

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

public class EPPRecipient extends Object implements EPPCodecComponent
Identifies the Recipient DataCollectionPolicy supported by the server:
  • <other> other entities following unknown practices
  • <ours> server operator and or servers operator agents
  • <public> public forums
  • <same> other entities following server practices
  • <unrelated> unrelated third parties.
  • Use methods setOther, setPublic, setSame, setUnRelated with a boolean value of true to create the necessary child element nodes. Use setOurs to set a Vector of ours child element nodes with optional descriptions.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    EPPRecipient(boolean aOther, Vector<String> aOurs, boolean aPublic, boolean aSame, boolean aUnrelated)
    Allocates a new EPPRecipient with differnt child elements based on the input parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addOurs(String aOursDesc)
    Add <ours> element with an optional description.
    Clone EPPRecipient.
    void
    decode(Element aElement)
    decode EPPRecipient from a DOM element tree.
    encode(Document aDocument)
    encode EPPRecipient into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPRecipient compare.
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the ours recipient descriptions.
    boolean
    <other> element set?
    boolean
    <public> element set?
    boolean
    <same> element set?
    boolean
    <unrelated> element set?
    void
    setOther(boolean aOther)
    Sets the <other> element.
    void
    Sets the <ours> elements that include a description String per ours element.
    void
    setPublic(boolean aPublic)
    Sets the <public> element to specify public forums.
    void
    setSame(boolean aSame)
    Sets the <same> element to specify other entities following server practices.
    void
    setUnrelated(boolean aUnrelated)
    Sets the <unrelated> element to specify Unrelated third parties.
    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

    • EPPRecipient

      public EPPRecipient()
      Default constructor.
    • EPPRecipient

      public EPPRecipient(boolean aOther, Vector<String> aOurs, boolean aPublic, boolean aSame, boolean aUnrelated)
      Allocates a new EPPRecipient with differnt child elements based on the input parameters. The child element are created based on the following input parameter values:

      • if aOther parameter is set to true then the other element other is created
      • if aOurs Vector of String that describes the recipient. A null String indicates that the recipient has no description.
      • if aPublic parameter is set to true then the public element public is created
      • if aSame parameter is set to true then the same element same is created
      • if aUnrelated parameter is set to true then the unrelated element unrelated is created
      Parameters:
      aOther - DOCUMENT ME!
      aOurs - DOCUMENT ME!
      aPublic - DOCUMENT ME!
      aSame - DOCUMENT ME!
      aUnrelated - DOCUMENT ME!
  • Method Details

    • isOther

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

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

      public Vector<String> getOurs()
      Gets the ours recipient descriptions. A null description indicates a ours recipient without a description.
      Returns:
      Vector of String ours descriptions if defined; null otherwise.
    • setOurs

      public void setOurs(Vector<String> aOurs)
      Sets the <ours> elements that include a description String per ours element. A nullString indicates no description for the <ours> element.
      Parameters:
      aOurs - Vector of nullable String <ours> descriptions
    • addOurs

      public void addOurs(String aOursDesc)
      Add <ours> element with an optional description. A non-null aOursDesc represents a description, while a null value represents a <ours> element without a description.
      Parameters:
      aOursDesc - A nullable <ours> description
    • isPublic

      public boolean isPublic()
      <public> element set?
      Returns:
      true if is set; false otherwise.
    • setPublic

      public void setPublic(boolean aPublic)
      Sets the <public> element to specify public forums.
      Parameters:
      aPublic - true to include the <public> element; false otherwise.
    • isSame

      public boolean isSame()
      <same> element set?
      Returns:
      true if is set; false otherwise.
    • setSame

      public void setSame(boolean aSame)
      Sets the <same> element to specify other entities following server practices.
      Parameters:
      aSame - true to include the <same> element; false otherwise.
    • isUnrelated

      public boolean isUnrelated()
      <unrelated> element set?
      Returns:
      true if is set; false otherwise.
    • setUnrelated

      public void setUnrelated(boolean aUnrelated)
      Sets the <unrelated> element to specify Unrelated third parties.
      Parameters:
      aUnrelated - true to include the <unrelated> element; false otherwise.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPRecipient into a DOM element tree. The "recipient" element is created and the child nodes are appended as children.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document to create elements from
      Returns:
      recipient root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPRecipient from a DOM element tree. The aElement argument needs to be the <recipient> element
      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 deep EPPRecipient compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRecipient instance to compare with
      Returns:
      true if equal; false otherwise.
    • clone

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