Class EPPNameWatchAddRemove

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

public class EPPNameWatchAddRemove extends Object implements EPPCodecComponent
Represents attributes to change with a EPPNameWatchUpdateCmd. In EPPNameWatchUpdateCmd, an instance of EPPNameWatchAddRemove is used to specify the attributes to change

The NameWatch Mapping Specification describes the following attributes:
  • Zero or more <nameWatch:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the nameWatch object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the nameWatch object. Use getRegistrant and setRegistrant to get and set the element.
  • Zero or more <nameWatch:rptTo> elements that contain the email address and frequency type to be associated with the nameWatch. Use getRptTo and setRptTo to get and set the element.
  • One or two <nameWatch:AuthInfo> element that contains authorization information for the nameWatch object. Use getAuthInfo and setAuthInfo to get and set the element.

It is important to note that the maximum number of nameWatch attribute elements is subject to the number of values currently associated with the nameWatch object. EPPNameWatchAddRemove will delegate the validation of the cardinality of the nameWatch attributes elements to the EPP Server.

See Also:
  • Constructor Details

    • EPPNameWatchAddRemove

      public EPPNameWatchAddRemove()
      Default constructor for EPPNameWatchAddRemove. All of the attribute default to null to indicate no modification.
    • EPPNameWatchAddRemove

      public EPPNameWatchAddRemove(Vector aStatuses)
      Constructor for EPPNameWatchAddRemove that includes the attributes as arguments.
      Parameters:
      aStatuses - Vector statuses
    • EPPNameWatchAddRemove

      public EPPNameWatchAddRemove(String aRegistrant, EPPNameWatchRptTo aRptTo, EPPAuthInfo aAuthInfo)
      Constructor for EPPNameWatchAddRemove that includes the attributes as arguments.
      Parameters:
      aRegistrant - String registrant
      aRptTo - EPPNameWatchRptTo reply to
      aAuthInfo - EPPAuthInfo authorization information
  • Method Details

    • encode

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

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPNameWatchAddRemove attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPNameWatchAddRemove from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPNameWatchAddRemove compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPNameWatchAddRemove instance to compare with
      Returns:
      DOCUMENT ME!
    • clone

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

      public EPPAuthInfo getAuthInfo()
      Get authorization information
      Returns:
      Instance of EPPAuthInfo if defined; null otherwise.
    • getRegistrant

      public String getRegistrant()
      Get registrant
      Returns:
      registrant if defined; null otherwise.
    • getRptTo

      public EPPNameWatchRptTo getRptTo()
      Gets the rptTo
      Returns:
      Instance of EPPNameWatchRptTo if defined; null otherwise.
    • getStatuses

      public Vector getStatuses()
      Gets the statuses to add or remove. The EPPNameWatchStatus.STATUS_ constants can be used for the statuses.
      Returns:
      Vector of status String instances.
    • setStatuses

      public void setStatuses(Vector aStatuses)
      Sets the statuses to add or remove. The EPPNameWatchStatus.STATUS_ constants can be used for the statuses.
      Parameters:
      aStatuses - Vector of status String instances.
    • setRptTo

      public void setRptTo(EPPNameWatchRptTo aRptTo)
      Sets the rptTo
      Parameters:
      aRptTo - EPPNameWatchRptTo
    • setAuthInfo

      public void setAuthInfo(EPPAuthInfo newAuthInfo)
      Set authorization information
      Parameters:
      newAuthInfo - EPPAuthInfo
    • setRegistrant

      public void setRegistrant(String newRegistrant)
      Set registrant
      Parameters:
      newRegistrant - registrant
    • getNamespace

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