Class EPPFeeCheckResult

  • All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

    public class EPPFeeCheckResult
    extends java.lang.Object
    implements EPPCodecComponent
    EPPFeeCheckResult represents a fee result to a check.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_LOCALNAME
      XML local name for EPPFeeCheckResult.
      static java.lang.String ELM_NAME
      XML root tag for EPPFeeCheckResult.
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPFeeCheckResult()
      Default constructor for EPPFeeCheckResult.
      EPPFeeCheckResult​(java.lang.String aObjID, boolean aAvailable)
      Constructor for EPPFeeCheckResult that only takes the identifier (domain name) and the available flag.
      EPPFeeCheckResult​(java.lang.String aObjID, EPPFeeCommandData aCommand)
      Constructor for EPPFeeCheckResult that takes the identifier (domain name) and a single command for an available fee.
      EPPFeeCheckResult​(java.lang.String aObjID, java.lang.String aReason)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and the reason that the fee data is unavailable.
      EPPFeeCheckResult​(java.lang.String aObjID, java.lang.String aReason, java.lang.String aLanguage)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name), the reason that the fee data is unavailable, and the language of the reason.
      EPPFeeCheckResult​(java.lang.String aObjID, java.lang.String aClassification, java.lang.String aReason, java.lang.String aLanguage)
      Constructor for EPPFeeCheckResult that takes all attributes.
      EPPFeeCheckResult​(java.lang.String aObjID, java.util.List<EPPFeeCommandData> aCommands)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and a list of commands for an available fee.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCommand​(EPPFeeCommandData aCommand)
      Adds a command to the list of commands.
      java.lang.Object clone()
      Clone an EPPCodecComponent instance.
      void decode​(org.w3c.dom.Element aElement)
      Decode a DOM element tree to initialize the instance attributes.
      org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
      Encode instance into a DOM element tree.
      boolean equals​(java.lang.Object aObject)
      Compare an instance of EPPFeeCheckResult with this instance.
      java.lang.String getClassification()
      Gets the classification.
      java.util.List<EPPFeeCommandData> getCommands()
      Gets the list of commands if defined.
      java.lang.String getLanguage()
      Gets reason language
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      java.lang.String getObjID()
      Gets the object identifier value.
      java.lang.String getReason()
      Gets the reason value.
      boolean hasClassification()
      Is the classification defined?
      boolean hasCommands()
      Are the commands defined?
      boolean hasReason()
      Is the reason defined if the available attribute is false?
      boolean isAvailable()
      Is the fee information available? See getReason() to get the optional reason when available is false.
      void setAvailable​(boolean aAvailable)
      Sets the fee information available value.
      void setClassification​(java.lang.String aClassification)
      Sets the classification.
      void setCommands​(java.util.List<EPPFeeCommandData> aCommands)
      Sets the list of commands.
      void setLanguage​(java.lang.String aLanguage)
      Sets language attribute.
      void setObjID​(java.lang.String aObjID)
      Sets the name value.
      void setReason​(java.lang.String aReason)
      Sets the reason value.
      java.lang.String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ELM_LOCALNAME

        public static final java.lang.String ELM_LOCALNAME
        XML local name for EPPFeeCheckResult.
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        XML root tag for EPPFeeCheckResult.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPFeeCheckResult

        public EPPFeeCheckResult()
        Default constructor for EPPFeeCheckResult.
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 boolean aAvailable)
        Constructor for EPPFeeCheckResult that only takes the identifier (domain name) and the available flag.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aAvailable - Fee available flag. If true, at least one fee command data element must be set and if false a reason should be set.
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 EPPFeeCommandData aCommand)
        Constructor for EPPFeeCheckResult that takes the identifier (domain name) and a single command for an available fee.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aCommand - Command fee data
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 java.util.List<EPPFeeCommandData> aCommands)
        Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and a list of commands for an available fee.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aCommands - Command fee data
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 java.lang.String aReason)
        Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and the reason that the fee data is unavailable.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aReason - Reason that the fee data is unavailable.
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 java.lang.String aReason,
                                 java.lang.String aLanguage)
        Constructor for EPPFeeCheckResult that takes the object identifier (domain name), the reason that the fee data is unavailable, and the language of the reason.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aReason - Reason that the fee data is unavailable.
        aLanguage - Language of the aReason value.
      • EPPFeeCheckResult

        public EPPFeeCheckResult​(java.lang.String aObjID,
                                 java.lang.String aClassification,
                                 java.lang.String aReason,
                                 java.lang.String aLanguage)
        Constructor for EPPFeeCheckResult that takes all attributes.
        Parameters:
        aObjID - Object identifier. An example is the domain name for extension of a domain check response.
        aClassification - Fee classification for object. Set to null for no classification.
        aReason - Reason that the fee data is unavailable.
        aLanguage - Language of the aReason value.
    • Method Detail

      • getObjID

        public java.lang.String getObjID()
        Gets the object identifier value.
        Returns:
        Object identifier value if defined; null otherwise.
      • setObjID

        public void setObjID​(java.lang.String aObjID)
        Sets the name value.
        Parameters:
        aObjID - Object identifier value
      • hasClassification

        public boolean hasClassification()
        Is the classification defined?
        Returns:
        true if the classification is defined; false otherwise.
      • getClassification

        public java.lang.String getClassification()
        Gets the classification.
        Returns:
        The classification value if defined; null otherwise.
      • setClassification

        public void setClassification​(java.lang.String aClassification)
        Sets the classification.
        Parameters:
        aClassification - the classification to set
      • isAvailable

        public boolean isAvailable()
        Is the fee information available? See getReason() to get the optional reason when available is false.
        Returns:
        true if the fee information is available; false otherwise.
      • setAvailable

        public void setAvailable​(boolean aAvailable)
        Sets the fee information available value. See setReason(String) to set the optional reason when available is false.
        Parameters:
        aAvailable - true if the fee is available; false otherwise.
      • hasCommands

        public boolean hasCommands()
        Are the commands defined?
        Returns:
        true if the commands are defined; false otherwise.
      • getCommands

        public java.util.List<EPPFeeCommandData> getCommands()
        Gets the list of commands if defined.
        Returns:
        List of commands if defined; empty list otherwise.
      • addCommand

        public void addCommand​(EPPFeeCommandData aCommand)
        Adds a command to the list of commands.
        Parameters:
        aCommand - The command to add.
      • setCommands

        public void setCommands​(java.util.List<EPPFeeCommandData> aCommands)
        Sets the list of commands.
        Parameters:
        aCommands - The commands 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 reason language attribute.
      • encode

        public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                   throws EPPEncodeException
        Encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.
        Specified by:
        encode in interface EPPCodecComponent
        Parameters:
        aDocument - DOM Document, which acts is an Element factory
        Returns:
        Element Root element associated with the object
        Throws:
        EPPEncodeException - Error encoding EPPFeeCheckResult
      • decode

        public void decode​(org.w3c.dom.Element aElement)
                    throws EPPDecodeException
        Decode a DOM element tree to initialize the instance attributes. The aElement argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.
        Specified by:
        decode in interface EPPCodecComponent
        Parameters:
        aElement - Element to decode
        Throws:
        EPPDecodeException - Error decoding Element
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone an EPPCodecComponent instance.
        Specified by:
        clone in interface EPPCodecComponent
        Overrides:
        clone in class java.lang.Object
        Returns:
        clone of concrete EPPFeeCheckResult
        Throws:
        java.lang.CloneNotSupportedException - standard Object.clone exception
      • 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 java.lang.Object
        Returns:
        Indented XML String if successful; ERROR otherwise.
      • equals

        public boolean equals​(java.lang.Object aObject)
        Compare an instance of EPPFeeCheckResult with this instance.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - Object to compare with.
        Returns:
        true if equal; false otherwise.
      • getNamespace

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