Class EPPTtl

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

    public class EPPTtl
    extends java.lang.Object
    implements EPPCodecComponent
    EPPTtl is used to define TTL values for the DNS resource records associated with domain and host objects.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_LOCALNAME
      Constant for the phase local name
      static java.lang.String ELM_NAME
      Constant for the phase qualified name (prefix and local name)
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPTtl()
      Default constructor.
      EPPTtl​(RRecType aRRecType)
      Create EPPTtl instance with the TTL resource record type and with a null TTL value.
      EPPTtl​(RRecType aRRecType, java.lang.Integer aValue)
      Create EPPTtl instance with the TTL resource record type and the TTL value.
      EPPTtl​(RRecType aRRecType, java.lang.String aCustom)
      Create EPPTtl instance with a custom TTL resource record type and with a null TTL value.
      EPPTtl​(RRecType aRRecType, java.lang.String aCustom, java.lang.Integer aValue)
      Create EPPTtl instance with a custom TTL resource record type and the TTL value.
      EPPTtl​(RRecType aRRecType, java.lang.String aCustom, java.lang.Integer aMinValue, java.lang.Integer aMaxValue, java.lang.Integer aDefaultValue, java.lang.Integer aValue)
      Create EPPTtl instance with all of the attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Clone EPPTtl instance.
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPTtl element aElement DOM Element tree.
      org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
      Encode a DOM Element tree from the attributes of the EPPTtl instance.
      boolean equals​(java.lang.Object aObject)
      implements a deep EPPTtl compare.
      java.lang.String getCustom()
      Gets the custom resource record type attribute value.
      java.lang.Integer getDefaultValue()
      Gets the default TTL value.
      java.lang.Integer getMaxValue()
      Gets the max TTL value.
      java.lang.Integer getMinValue()
      Gets the min TTL value.
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      RRecType getRRecType()
      Gets the resource record type.
      java.lang.Integer getValue()
      Gets the TTL value.
      boolean hasCustom()
      Is the custom resource record type attribute defined?
      boolean hasDefaultValue()
      Is the default TTL value defined?
      boolean hasMaxValue()
      Is the max TTL value defined?
      boolean hasMinValue()
      Is the min TTL value defined?
      boolean hasPolicyValues()
      Are all the policy TTL values (minValue, maxValue, defaultValue) defined?
      boolean hasValue()
      Is the TTL value defined?
      void setCustom​(java.lang.String aCustom)
      Sets the custom resource record type attribute value.
      void setDefaultValue​(java.lang.Integer aDefaultValue)
      Sets the TTL default value.
      void setMaxValue​(java.lang.Integer aMaxValue)
      Sets the TTL max value.
      void setMinValue​(java.lang.Integer aMinValue)
      Sets the TTL min value.
      void setPolicyValues​(java.lang.Integer aMinValue, java.lang.Integer aMaxValue, java.lang.Integer aDefaultValue)
      Sets the policy TTL values (minValue, maxValue, defaultValue).
      void setRRecType​(RRecType aRRecType)
      Sets resource record type.
      void setValue​(java.lang.Integer aValue)
      Sets the TTL value.
      java.lang.String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      void unsetPolicyValues()
      Unsets the policy TTL values (minValue, maxValue, defaultValue).
      • 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
        Constant for the phase local name
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        Constant for the phase qualified name (prefix and local name)
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPTtl

        public EPPTtl()
        Default constructor. By default the value is null, which will unset the TTL setting.
      • EPPTtl

        public EPPTtl​(RRecType aRRecType)
        Create EPPTtl instance with the TTL resource record type and with a null TTL value.
        Parameters:
        aRRecType - Required resource record type
      • EPPTtl

        public EPPTtl​(RRecType aRRecType,
                      java.lang.String aCustom)
        Create EPPTtl instance with a custom TTL resource record type and with a null TTL value.
        Parameters:
        aRRecType - Required resource record type
        aCustom - Custom resource record type
      • EPPTtl

        public EPPTtl​(RRecType aRRecType,
                      java.lang.Integer aValue)
        Create EPPTtl instance with the TTL resource record type and the TTL value.
        Parameters:
        aRRecType - Required resource record type
        aValue - The TTL value. Set to null to unset the explicit TTL value.
      • EPPTtl

        public EPPTtl​(RRecType aRRecType,
                      java.lang.String aCustom,
                      java.lang.Integer aValue)
        Create EPPTtl instance with a custom TTL resource record type and the TTL value.
        Parameters:
        aRRecType - Required resource record type
        aCustom - Custom resource record type
        aValue - The TTL value. Set to null to unset the explicit TTL value.
      • EPPTtl

        public EPPTtl​(RRecType aRRecType,
                      java.lang.String aCustom,
                      java.lang.Integer aMinValue,
                      java.lang.Integer aMaxValue,
                      java.lang.Integer aDefaultValue,
                      java.lang.Integer aValue)
        Create EPPTtl instance with all of the attributes.
        Parameters:
        aRRecType - Required resource record type
        aCustom - Custom resource record type. Use null if undefined.
        aMinValue - Min TTL value. Use null if undefined.
        aMaxValue - Max TTL value. Use null if undefined.
        aDefaultValue - Default TTL value. Use null if undefined.
        aValue - The ttl value. Set to null to unset the explicit TTL value.
    • Method Detail

      • getRRecType

        public RRecType getRRecType()
        Gets the resource record type.
        Returns:
        Resource record type if defined; null otherwise.
      • setRRecType

        public void setRRecType​(RRecType aRRecType)
        Sets resource record type.
        Parameters:
        aRRecType - Sets resource record type
      • hasCustom

        public boolean hasCustom()
        Is the custom resource record type attribute defined?
        Returns:
        true if the custom resource record type attribute is defined; false otherwise.
      • getCustom

        public java.lang.String getCustom()
        Gets the custom resource record type attribute value.
        Returns:
        Custom resource record type attribute if defined; null otherwise.
      • setCustom

        public void setCustom​(java.lang.String aCustom)
        Sets the custom resource record type attribute value.
        Parameters:
        aCustom - Custom resource record type value. Unset with null.
      • hasMinValue

        public boolean hasMinValue()
        Is the min TTL value defined?
        Returns:
        true if the min TTL value is defined; false otherwise.
      • getMinValue

        public java.lang.Integer getMinValue()
        Gets the min TTL value.
        Returns:
        Min TTL value if defined; null otherwise.
      • setMinValue

        public void setMinValue​(java.lang.Integer aMinValue)
        Sets the TTL min value.
        Parameters:
        aMinValue - Min TTL value. Unset with null.
      • hasMaxValue

        public boolean hasMaxValue()
        Is the max TTL value defined?
        Returns:
        true if the max TTL value is defined; false otherwise.
      • getMaxValue

        public java.lang.Integer getMaxValue()
        Gets the max TTL value.
        Returns:
        Max TTL value if defined; null otherwise.
      • setMaxValue

        public void setMaxValue​(java.lang.Integer aMaxValue)
        Sets the TTL max value.
        Parameters:
        aMaxValue - Max TTL value. Unset with null.
      • hasDefaultValue

        public boolean hasDefaultValue()
        Is the default TTL value defined?
        Returns:
        true if the default TTL value is defined; false otherwise.
      • getDefaultValue

        public java.lang.Integer getDefaultValue()
        Gets the default TTL value.
        Returns:
        Default TTL value if defined; null otherwise.
      • setDefaultValue

        public void setDefaultValue​(java.lang.Integer aDefaultValue)
        Sets the TTL default value.
        Parameters:
        aDefaultValue - Default TTL value. Unset with null.
      • hasPolicyValues

        public boolean hasPolicyValues()
        Are all the policy TTL values (minValue, maxValue, defaultValue) defined?
        Returns:
        true if all of the policy TTL values are defined; false otherwise.
      • setPolicyValues

        public void setPolicyValues​(java.lang.Integer aMinValue,
                                    java.lang.Integer aMaxValue,
                                    java.lang.Integer aDefaultValue)
        Sets the policy TTL values (minValue, maxValue, defaultValue).
        Parameters:
        aMinValue - Min TTL value. Use null if undefined.
        aMaxValue - Max TTL value. Use null if undefined.
        aDefaultValue - Default TTL value. Use null if undefined.
      • unsetPolicyValues

        public void unsetPolicyValues()
        Unsets the policy TTL values (minValue, maxValue, defaultValue).
      • hasValue

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

        public java.lang.Integer getValue()
        Gets the TTL value.
        Returns:
        TTL value if defined; null otherwise.
      • setValue

        public void setValue​(java.lang.Integer aValue)
        Sets the TTL value.
        Parameters:
        aValue - TTL value. Unset with null.
      • clone

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

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

        public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                   throws EPPEncodeException
        Encode a DOM Element tree from the attributes of the EPPTtl 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 EPPTtl instance.
        Throws:
        EPPEncodeException - - Unable to encode EPPTtl instance.
      • equals

        public boolean equals​(java.lang.Object aObject)
        implements a deep EPPTtl compare.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - EPPTtl 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 java.lang.Object
        Returns:
        Indented XML String if successful; ERROR 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.