Class EPPFeeCommand

java.lang.Object
com.verisign.epp.codec.fee.v1_0.EPPFeeCommand
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable
Direct Known Subclasses:
EPPFeeCommandData

public class EPPFeeCommand extends Object implements EPPCodecComponent
The command along with the optional phase, sub-phase, and custom name that the fee is associated with.
See Also:
  • Field Details

    • 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:
    • ATTR_PHASE

      public static final String ATTR_PHASE
      OPTIONAL phase attribute name that defines the phase of the command.
      See Also:
    • ATTR_SUBPHASE

      public static final String ATTR_SUBPHASE
      OPTIONAL subphase attribute name that defines the sub-phase of the command.
      See Also:
    • ATTR_NAME

      public static final String ATTR_NAME
      name attribute that is set with the Command value.
      See Also:
    • ATTR_CUSTOMNAME

      public static final String ATTR_CUSTOMNAME
      OPTIONAL customName attribute name used when the command is set to Command.CUSTOM.
      See Also:
  • Constructor Details

    • EPPFeeCommand

      public EPPFeeCommand()
      Default constructor.
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand)
      Create EPPFeeCommand instance with a defined command value.
      Parameters:
      aCommand - Command value.
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand, EPPFeePeriod aPeriod)
      Create EPPFeeCommand instance with a defined command value and period.
      Parameters:
      aCommand - Command value.
      aPeriod - Command period
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand, String aCustomName)
      Create EPPFeeCommand instance with a defined command value and custom name value.
      Parameters:
      aCommand - Command value, which should be Command.CUSTOM.
      aCustomName - Custom name of the command.
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand, Phase aPhase)
      Create EPPFeeCommand instance with a defined command and phase value.
      Parameters:
      aCommand - Command value.
      aPhase - Phase value.
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand, Phase aPhase, String aSubPhase)
      Create EPPFeeCommand instance with a defined command, phase, and sub-phase value.
      Parameters:
      aCommand - Command value.
      aPhase - Phase value.
      aSubPhase - Sub-phase value
    • EPPFeeCommand

      public EPPFeeCommand(Command aCommand, String aCustomName, Phase aPhase, String aSubPhase, EPPFeePeriod aPeriod)
      Create EPPFeeCommand instance with a defined command value and custom name value.
      Parameters:
      aCommand - Command value, which should be Command.CUSTOM.
      aCustomName - Custom name of the command.
      aPhase - Phase value.
      aSubPhase - Sub-phase value
      aPeriod - Command period
    • EPPFeeCommand

      public EPPFeeCommand(EPPFeeCommand aCommand)
      Instantiate instance using an existing EPPFeeCommand instance. This is equivalent to cloning the EPPFeeCommand instance.
      Parameters:
      aCommand - instance to initialize the EPPFeeCommand instance with.
  • Method Details

    • hasCommand

      public boolean hasCommand()
      Is the command defined?
      Returns:
      true if the command is defined; false otherwise.
    • getCommand

      public Command getCommand()
      Gets the command value.
      Returns:
      Command value if defined; null otherwise.
    • setCommand

      public void setCommand(Command aCommand)
      Sets the command value.
      Parameters:
      aCommand - Command value.
    • hasCustomName

      public boolean hasCustomName()
      Is the custom name defined?
      Returns:
      true if the custom name is defined; false otherwise.
    • getCustomName

      public String getCustomName()
      Gets the custom name value.
      Returns:
      Custom name value if defined; null otherwise.
    • setCustomName

      public void setCustomName(String aCustomName)
      Sets the custom name value when the command is set to Command.CUSTOM.
      Parameters:
      aCustomName - Custom name value.
    • hasPhase

      public boolean hasPhase()
      Is the phase defined?
      Returns:
      true if the phase is defined; false otherwise.
    • getPhase

      public Phase getPhase()
      Gets the OPTIONAL phase value.
      Returns:
      Phase value if defined; null otherwise.
    • setPhase

      public void setPhase(Phase aPhase)
      Sets the OPTIONAL phase value.
      Parameters:
      aPhase - Phase value
    • hasSubPhase

      public boolean hasSubPhase()
      Is the sub-phase defined?
      Returns:
      true if the phase is defined; false otherwise.
    • getSubPhase

      public String getSubPhase()
      Gets the OPTIONAL sub-phase value.
      Returns:
      Sub-phase value if defined; null otherwise.
    • setSubPhase

      public void setSubPhase(String aSubPhase)
      Sets the OPTIONAL sub-phase value.
      Parameters:
      aSubPhase - Sub-phase value.
    • hasPeriod

      public boolean hasPeriod()
      Is the period defined?
      Returns:
      true if the period is defined; false otherwise.
    • getPeriod

      public EPPFeePeriod getPeriod()
      Gets the period value.
      Returns:
      Period if defined; null otherwise.
    • setPeriod

      public void setPeriod(EPPFeePeriod aPeriod)
      Sets the optional period value.
      Parameters:
      aPeriod - Period value. Set to null to specify no period.
    • clone

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

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPFeeCommand element aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - - Root DOM Element to decode EPPFeeCommand 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 EPPFeeCommand 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 EPPFeeCommand instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPFeeCommand instance.
    • equals

      public boolean equals(Object aObject)
      Implements a deep EPPFeeCommand compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPFeeCommand 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.