Class EPPChangeOperation

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

public class EPPChangeOperation extends Object implements EPPCodecComponent
Transform operation executed on the object. The operation value should match one of the OPERATION constants and the "op" attribute can be set via the setOp(String) method to handle specific cases.
See Also:
  • Field Details

    • OPERATION_CREATE

      public static final String OPERATION_CREATE
      Create operation as defined in RFC 5730.
      See Also:
    • OPERATION_DELETE

      public static final String OPERATION_DELETE
      Delete operation as defined in RFC 5730.
      See Also:
    • OPERATION_RENEW

      public static final String OPERATION_RENEW
      Renew operation as defined in RFC 5730.
      See Also:
    • OPERATION_TRANSFER

      public static final String OPERATION_TRANSFER
      Transfer operation as defined in RFC 5730.
      See Also:
    • OPERATION_UPDATE

      public static final String OPERATION_UPDATE
      Update operation as defined in RFC 5730.
      See Also:
    • OPERATION_RESTORE

      public static final String OPERATION_RESTORE
      Update operation as defined in RFC 3915.
      See Also:
    • OPERATION_AUTO_RENEW

      public static final String OPERATION_AUTO_RENEW
      Auto renew operation executed by the server.
      See Also:
    • OPERATION_AUTO_DELETE

      public static final String OPERATION_AUTO_DELETE
      Auto delete operation executed by the server.
      See Also:
    • OPERATION_AUTO_PURGE

      public static final String OPERATION_AUTO_PURGE
      Auto purge operation executed by the server.
      See Also:
    • OPERATION_CUSTOM

      public static final String OPERATION_CUSTOM
      Custom operation.
      See Also:
    • ELM_LOCALNAME

      public static final String ELM_LOCALNAME
      Constant for the phase local name
      See Also:
    • ELM_NAME

      public static final String ELM_NAME
      Constant for the phase qualified name (prefix and local name)
      See Also:
  • Constructor Details

    • EPPChangeOperation

      public EPPChangeOperation()
      Default constructor. The operation value MUST be set using the setValue(String) method.
    • EPPChangeOperation

      public EPPChangeOperation(String aValue)
      Create EPPChangeOperation instance with a defined operation value.
      Parameters:
      aValue - Operation value using one of the OPERATION constants.
    • EPPChangeOperation

      public EPPChangeOperation(String aValue, String aOp)
      Create EPPChangeOperation instance with a defined operation value and the optional "op" attribute that defines either the sub-operation or the name of the operation when the operation value is set to OPERATION_CUSTOM.
      Parameters:
      aValue - Operation value using one of the OPERATION constants.
      aOp - Sub-operation or name of operation when aValue is set to OPERATION_CUSTOM.
  • Method Details

    • hasValue

      public boolean hasValue()
      Is the operation value defined?
      Returns:
      true if the operation value is defined; false otherwise.
    • getValue

      public String getValue()
      Gets the operation value, which should be one of the OPERATION constants.
      Returns:
      Operation value if defined; null otherwise.
    • setValue

      public void setValue(String aValue)
      Sets the operation value.
      Parameters:
      aValue - Operation value, which should be one of the OPERATION constants.
    • hasOp

      public boolean hasOp()
      Is the "op" attribute defined?
      Returns:
      true if the "op" attribute is defined; false otherwise.
    • getOp

      public String getOp()
      Gets the OPTIONAL "op" attribute value, which defines the sub-operation or name of the operation when the operation value is set to OPERATION_CUSTOM.
      Returns:
      The "op" attribute value if defined; null otherwise.
    • setOp

      public void setOp(String aOp)
      Sets the OPTIONAL "op" attribute value.
      Parameters:
      aOp - "op" attribute value that defines the sub-operation or name of the operation when the operation value is set to OPERATION_CUSTOM.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPChangeOperation instance.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPChangeOperation
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • decode

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

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

      public boolean equals(Object aObject)
      Implements a deep EPPChangeOperation compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPChangeOperation instance to compare with
      Returns:
      true if equal; false otherwise
    • 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.