Class EPPFeeCommandData

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

public class EPPFeeCommandData extends EPPFeeCommand
The command data included in a check response, that includes:
  1. command, customName, phase, subphase, and period from the base EPPFeeCommand
  2. fees
  3. credits
  4. classification
See Also:
  • Field Details

    • ATTR_STANDARD

      public static final String ATTR_STANDARD
      OPTIONAL standard attribute name that specifies the standard command fee with a default value of "0".
      See Also:
  • Constructor Details

    • EPPFeeCommandData

      public EPPFeeCommandData()
      Default constructor.
    • EPPFeeCommandData

      public EPPFeeCommandData(EPPFeeCommand aCommand)
      Instantiate instance by using an existing EPPFeeCommand instance. This will clone the EPPFeeCommand attributes.
      Parameters:
      aCommand - instance to initialize the EPPFeeCommand instance with.
    • EPPFeeCommandData

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

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

      public EPPFeeCommandData(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.
    • EPPFeeCommandData

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

      public EPPFeeCommandData(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
    • EPPFeeCommandData

      public EPPFeeCommandData(Command aCommand, String aCustomName, Phase aPhase, String aSubPhase, boolean aStandard, EPPFeePeriod aPeriod, List<EPPFeeValue> aFees, List<EPPFeeCredit> aCredits, String aReason, String aLanguage)
      Create EPPFeeCommand instance with all attributes.
      Parameters:
      aCommand - Command value, which should be Command.CUSTOM.
      aCustomName - Custom name of the command.
      aPhase - Phase for command. Set to null for no phase.
      aSubPhase - Sub-phase for command. Set to null for no sub-phase.
      aStandard - Command used the standard fee.
      aPeriod - Period for command. Set to null for no period.
      aFees - Fees for command. Set to null for no fees.
      aCredits - Credits for command. Set to null for no credits.
      aReason - Reason that the fee information is not available for command. Set to null for no reason.
      aLanguage - Language for reason with default of "en". Set to null to use default language.
  • Method Details

    • hasFees

      public boolean hasFees()
      Are the fees defined?
      Returns:
      true if the fees are defined; false otherwise.
    • getFees

      public List<EPPFeeValue> getFees()
      Gets the list of fees if defined.
      Returns:
      List of fees if defined; empty list otherwise.
    • addFee

      public void addFee(EPPFeeValue aFee)
      Adds a fee to the list of fees.
      Parameters:
      aFee - The fee to add.
    • setFees

      public void setFees(List<EPPFeeValue> aFees)
      Sets the list of fees.
      Parameters:
      aFees - The fees to set.
    • hasCredits

      public boolean hasCredits()
      Are the credits defined?
      Returns:
      true if the credits are defined; false otherwise.
    • getCredits

      public List<EPPFeeCredit> getCredits()
      Gets the list of credits if defined.
      Returns:
      List of credits if defined; empty list otherwise.
    • addCredit

      public void addCredit(EPPFeeCredit aCredit)
      Adds a credit to the list of credits.
      Parameters:
      aCredit - The credit to add.
    • setCredits

      public void setCredits(List<EPPFeeCredit> aCredits)
      Sets the list of credits.
      Parameters:
      aCredits - The credits to set.
    • hasReason

      public boolean hasReason()
      Is the reason defined if the available attribute is false?
      Returns:
      true if the reason is defined; false otherwise.
    • getReason

      public String getReason()
      Gets the reason value.
      Returns:
      Reason if defined; null otherwise.
    • setReason

      public void setReason(String aReason)
      Sets the reason value.
      Parameters:
      aReason - reason value
    • getLanguage

      public String getLanguage()
      Gets reason language
      Returns:
      Reason language
    • setLanguage

      public void setLanguage(String aLanguage)
      Sets language attribute.
      Parameters:
      aLanguage - Sets domain reason language attribute.
    • isStandard

      public boolean isStandard()
      Is the command a standard command?
      Returns:
      true if it is a standard fee command; false otherwise.
    • setStandard

      public void setStandard(boolean aStandard)
      Sets whether the command is a standard fee command.
      Parameters:
      aStandard - Set to true if the fee is refundable, false, or null if undefined.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPFeeCommand instance.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPFeeCommand
      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
      Overrides:
      decode in class EPPFeeCommand
      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
      Overrides:
      encode in class EPPFeeCommand
      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 EPPFeeCommand
      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 EPPFeeCommand
      Returns:
      Indented XML String if successful; ERROR otherwise.