com.verisign.epp.codec.defReg

## Class EPPDefRegAddRemove

- java.lang.Object
- - com.verisign.epp.codec.defReg.EPPDefRegAddRemove

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

      public class EPPDefRegAddRemove
      extends java.lang.Object
      implements EPPCodecComponent

  Represents attributes to add, remove or change with a `EPPDefRegUpdateCmd`. In `EPPDefRegUpdateCmd`, an instance of `EPPDefRegAddRemove` is used to specify the attributes to add; an instance of `EPPDefRegAddRemove` is used to specify the attributes to remove, and an instance of `EPPDefRegAddRemove` is used to specify the attributes to change
  The DefRegReg Mapping Specification describes the following attributes:
  - For `change` only, A optional <defReg:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the defReg object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the defReg object. Use `getRegistrant` and `setRegistrant` to get and set the element.
  - For `change` only, A optional <defReg:tm> element that contains trademark information to be associated with the defReg object. Use `getTm` and `setTm` to get and set the element.
  - For `change` only, A optional <defReg:tmcountry> element that contains trademark country information to be associated with the defReg object. Use `getTmCountry` and `setTmCountry` to get and set the element.
  - For `change` only, A optional <defReg:tmdate> element that contains tradeamark date information to be associated with the defReg object. Use `getTmDate` and `setTmDate` to get and set the element.
  - For `change` only, An OPTIONAL <defReg:admincontact> element that contains the defreg forwardTo addresses. Use `getAdminContact` and `setAdminContact` to get and set the Admin Contacts.
  - For `change` only, An OPTIONAL <defReg:authInfo> element that contains authorization information to be associated with the defReg object.
  It is important to note that the maximum number of defReg attribute elements is subject to the number of values currently associated with the defReg object. `EPPDefRegAddRemove` will delegate the validation of the cardinality of the defReg attributes elements to the EPP Server.
  See Also:
    `EPPDefRegUpdateCmd`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPDefRegAddRemove()` Default constructor for `EPPDefRegAddRemove`.
    `EPPDefRegAddRemove(java.lang.String aRegistrant, java.lang.String aTm, java.lang.String aTmCountry, java.util.Date aTmDate, java.lang.String aAdminContact, EPPAuthInfo aAuthInfo)` Constructor for `EPPDefRegAddRemove` that includes the attributes as arguments.
    `EPPDefRegAddRemove(java.util.Vector aStatuses)` Constructor for `EPPDefRegAddRemove` that includes the attributes as arguments.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPDefRegAddRemove`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPDefRegAddRemove` 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 `EPPDefRegAddRemove` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPDefRegAddRemove` compare.
    `java.lang.String` | `getAdminContact()` Get AdminContact Address
    `EPPAuthInfo` | `getAuthInfo()` Get authorization information for the change mode
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.lang.String` | `getRegistrant()` Get registrant for the change mode
    `java.util.Vector` | `getStatuses()` Gets the statuses to add or remove.
    `java.lang.String` | `getTm()` Get the trademark informnation.
    `java.lang.String` | `getTmCountry()` Get the trademark country informnation.
    `java.util.Date` | `getTmDate()` Get the trademark date informnation.
    `void` | `setAdminContact(java.lang.String newAdminContact)` Set forwardTo Address for the change mode
    `void` | `setAuthInfo(EPPAuthInfo newAuthInfo)` Set authorization information for the change mode
    `void` | `setRegistrant(java.lang.String newRegistrant)` Set registrant for the change mode
    `void` | `setStatuses(java.util.Vector aStatuses)` Sets the statuses to add or remove.
    `void` | `setTm(java.lang.String aTm)` Set the trademark informnation.
    `void` | `setTmCountry(java.lang.String aTmCountry)` Set the trademark country informnation.
    `void` | `setTmDate(java.util.Date aTmDate)` Set the trademark date informnation.
    `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`

- - ### Constructor Detail

    - #### EPPDefRegAddRemove

          public EPPDefRegAddRemove()

      Default constructor for `EPPDefRegAddRemove`. All of the attribute default to `null` to indicate no modification.

    - #### EPPDefRegAddRemove

          public EPPDefRegAddRemove(java.util.Vector aStatuses)

      Constructor for `EPPDefRegAddRemove` that includes the attributes as arguments.
      Parameters:
        `aStatuses` - `Vector` statuses

    - #### EPPDefRegAddRemove

          public EPPDefRegAddRemove(java.lang.String aRegistrant,
                                    java.lang.String aTm,
                                    java.lang.String aTmCountry,
                                    java.util.Date aTmDate,
                                    java.lang.String aAdminContact,
                                    EPPAuthInfo aAuthInfo)

      Constructor for `EPPDefRegAddRemove` that includes the attributes as arguments.
      Parameters:
        `aRegistrant` - `String` registrant for the change mode
        `aTm` - DefReg TradeMark
        `aTmCountry` - DefReg TradeMarkCountry
        `aTmDate` - DefReg TradeMarkDate
        `aAdminContact` - `String` registrant AdminContact
        `aAuthInfo` - `EPPAuthInfo` authorization information for the change mode

  - ### 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 `EPPDefRegAddRemove` 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 `EPPDefRegAddRemove` instance.
      Throws:
        `EPPEncodeException` - Unable to encode `EPPDefRegAddRemove` instance.

    - #### decode

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

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

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPDefRegAddRemove` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPDefRegAddRemove` instance to compare with
      Returns:
        DOCUMENT ME!

    - #### clone

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

      Clone `EPPDefRegAddRemove`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPDefRegAddRemove`
      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.

    - #### getAuthInfo

          public EPPAuthInfo getAuthInfo()

      Get authorization information for the change mode
      Returns:
        com.verisign.epp.codec.defReg.EPPDefRegAuthInfo

    - #### getRegistrant

          public java.lang.String getRegistrant()

      Get registrant for the change mode
      Returns:
        java.lang.String

    - #### getTm

          public java.lang.String getTm()

      Get the trademark informnation.
      Returns:
        DefReg tradeMark

    - #### setTm

          public void setTm(java.lang.String aTm)

      Set the trademark informnation.
      Parameters:
        `aTm` - DefReg registrant

    - #### getTmCountry

          public java.lang.String getTmCountry()

      Get the trademark country informnation.
      Returns:
        DefReg trademark country

    - #### setTmCountry

          public void setTmCountry(java.lang.String aTmCountry)

      Set the trademark country informnation.
      Parameters:
        `aTmCountry` - DefReg trademark country

    - #### getTmDate

          public java.util.Date getTmDate()

      Get the trademark date informnation.
      Returns:
        DefReg trademark date

    - #### setTmDate

          public void setTmDate(java.util.Date aTmDate)

      Set the trademark date informnation.
      Parameters:
        `aTmDate` - DefReg trademark date

    - #### getAdminContact

          public java.lang.String getAdminContact()

      Get AdminContact Address
      Returns:
        java.lang.String

    - #### setAuthInfo

          public void setAuthInfo(EPPAuthInfo newAuthInfo)

      Set authorization information for the change mode
      Parameters:
        `newAuthInfo` - com.verisign.epp.codec.defReg.EPPDefRegAuthInfo

    - #### setRegistrant

          public void setRegistrant(java.lang.String newRegistrant)

      Set registrant for the change mode
      Parameters:
        `newRegistrant` - java.lang.String

    - #### setAdminContact

          public void setAdminContact(java.lang.String newAdminContact)

      Set forwardTo Address for the change mode
      Parameters:
        `newAdminContact` - java.lang.String

    - #### getStatuses

          public java.util.Vector getStatuses()

      Gets the statuses to add or remove. The `EPPDefRegStatus.STATUS_` constants can be used for the statuses.
      Returns:
        Vector of status `String` instances.

    - #### setStatuses

          public void setStatuses(java.util.Vector aStatuses)

      Sets the statuses to add or remove. The `EPPDefRegStatus.STATUS_` constants can be used for the statuses.
      Parameters:
        `aStatuses` - Vector of status `String` instances.

    - #### 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`.