Class EPPTtl

java.lang.Object
com.verisign.epp.codec.ttl.v1_0.EPPTtl
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

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

  • Constructor Details

    • 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, 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, 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, String aCustom, 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, String aCustom, Integer aMinValue, Integer aMaxValue, Integer aDefaultValue, 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 Details

    • 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 String getCustom()
      Gets the custom resource record type attribute value.
      Returns:
      Custom resource record type attribute if defined; null otherwise.
    • setCustom

      public void setCustom(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 Integer getMinValue()
      Gets the min TTL value.
      Returns:
      Min TTL value if defined; null otherwise.
    • setMinValue

      public void setMinValue(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 Integer getMaxValue()
      Gets the max TTL value.
      Returns:
      Max TTL value if defined; null otherwise.
    • setMaxValue

      public void setMaxValue(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 Integer getDefaultValue()
      Gets the default TTL value.
      Returns:
      Default TTL value if defined; null otherwise.
    • setDefaultValue

      public void setDefaultValue(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(Integer aMinValue, Integer aMaxValue, 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 Integer getValue()
      Gets the TTL value.
      Returns:
      TTL value if defined; null otherwise.
    • setValue

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

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

      public void decode(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 Element encode(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(Object aObject)
      implements a deep EPPTtl compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPTtl 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.