Class EPPEmailFwdAddRemove

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

public class EPPEmailFwdAddRemove extends Object implements EPPCodecComponent
Represents attributes to add, remove or change with a EPPEmailFwdUpdateCmd. In EPPEmailFwdUpdateCmd, an instance of EPPEmailFwdAddRemove is used to specify the attributes to add; an instance of EPPEmailFwdAddRemove is used to specify the attributes to remove, and an instance of EPPEmailFwdAddRemove is used to specify the attributes to change

The EmailFwdEmailFwd Mapping Specification describes the following attributes:
  • Zero or more <emailFwd:contact> elements that contain the registrant, administrative, technical, and billing contact identiEmailFwdfiers to be associated with the emailFwd. Use getContacts and setContacts to get and set the element. This attribute will only be allowed if the Contact Mapping is supported.
  • One or two <emailFwd:status> elements that contain status values to be applied to or removed from the emailFwd object. Use getStatuses and setStatuses to get and set the element.
  • For change only, A <emailFwd:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the emailFwd object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the emailFwd object. Use getRegistrant and setRegistrant to get and set the element.
  • For change only, An OPTIONAL <emailFwd:fwdTo> element that contains the email forwardTo addresses. Use getForwardTo and setForwardTo to get and set the forwardTo addresses.

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

See Also:
  • Constructor Details

    • EPPEmailFwdAddRemove

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

      public EPPEmailFwdAddRemove(Vector someContacts, Vector someStatuses)
      Constructor for EPPEmailFwdAddRemove that includes the attributes as arguments.
      Parameters:
      someContacts - Vector of EPPEmailFwdContact instances. Is null or empty for no modifications. If the Contact Mapping is not supported, this value should be null.
      someStatuses - Vector of status String's. One of the EPPEmailFwdInfoResp.STATUS_ contants can be used for each of the status values. Is null or empty for no modifications.
    • EPPEmailFwdAddRemove

      public EPPEmailFwdAddRemove(String aRegistrant, String aForwardTo, EPPAuthInfo aAuthInfo)
      Constructor for EPPEmailFwdAddRemove that includes the attributes as arguments.
      Parameters:
      aRegistrant - String registrant for the change mode
      aForwardTo - String forwardTo address of the email.
      aAuthInfo - EPPAuthInfo authorization information for the change mode
  • Method Details

    • getContacts

      public Vector getContacts()
      Gets the contacts to add or remove.
      Returns:
      Vector of EPPEmailFwdContact instances.
    • setContacts

      public void setContacts(Vector aContacts)
      Sets the contacts to add or remove.
      Parameters:
      aContacts - DOCUMENT ME!
    • getStatuses

      public Vector getStatuses()
      Gets the statuses to add or remove. The EPPEmailFwdInfoResp.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 EPPEmailFwdInfoResp.STATUS_ constants can be used for the statuses.
      Parameters:
      aStatuses - Vector of status String instances.
    • contactsSupported

      public boolean contactsSupported()
      Return if EmailFwd Contacts is supported.
      Returns:
      true if contacts are supported; false otherwise.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPEmailFwdAddRemove 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 EPPEmailFwdAddRemove instance.
      Throws:
      EPPEncodeException - Unable to encode EPPEmailFwdAddRemove instance.
    • decode

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

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

      public Object clone() throws CloneNotSupportedException
      Clone EPPEmailFwdAddRemove.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPEmailFwdAddRemove
      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 for the change mode
      Returns:
      com.verisign.epp.codec.emailFwd.EPPEmailFwdAuthInfo
    • getRegistrant

      public String getRegistrant()
      Get registrant for the change mode
      Returns:
      java.lang.String
    • getForwardTo

      public String getForwardTo()
      Get forwardTo Address
      Returns:
      java.lang.String
    • setAuthInfo

      public void setAuthInfo(EPPAuthInfo newAuthInfo)
      Set authorization information for the change mode
      Parameters:
      newAuthInfo - com.verisign.epp.codec.emailFwd.EPPEmailFwdAuthInfo
    • setRegistrant

      public void setRegistrant(String newRegistrant)
      Set registrant for the change mode
      Parameters:
      newRegistrant - java.lang.String
    • setForwardTo

      public void setForwardTo(String newForwardTo)
      Set forwardTo Address for the change mode
      Parameters:
      newForwardTo - java.lang.String
    • getNamespace

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