Class EPPFeeCommandData

  • All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.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:
    Serialized Form
    • Field Detail

      • ATTR_STANDARD

        public static final java.lang.String ATTR_STANDARD
        OPTIONAL standard attribute name that specifies the standard command fee with a default value of "0".
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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,
                                 java.lang.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,
                                 java.lang.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,
                                 java.lang.String aCustomName,
                                 Phase aPhase,
                                 java.lang.String aSubPhase,
                                 boolean aStandard,
                                 EPPFeePeriod aPeriod,
                                 java.util.List<EPPFeeValue> aFees,
                                 java.util.List<EPPFeeCredit> aCredits,
                                 java.lang.String aReason,
                                 java.lang.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 Detail

      • hasFees

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

        public java.util.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​(java.util.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 java.util.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​(java.util.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 java.lang.String getReason()
        Gets the reason value.
        Returns:
        Reason if defined; null otherwise.
      • setReason

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

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

        public void setLanguage​(java.lang.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 java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone EPPFeeCommand instance.
        Specified by:
        clone in interface EPPCodecComponent
        Overrides:
        clone in class EPPFeeCommand
        Returns:
        clone of EPPFeeCommand
        Throws:
        java.lang.CloneNotSupportedException - standard Object.clone exception
      • encode

        public org.w3c.dom.Element encode​(org.w3c.dom.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​(java.lang.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 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 EPPFeeCommand
        Returns:
        Indented XML String if successful; ERROR otherwise.