Class EPPKeyRelayExpiry

java.lang.Object
com.verisign.epp.codec.keyrelay.EPPKeyRelayExpiry
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPKeyRelayExpiry extends Object implements EPPCodecComponent
The EPPKeyRelayExpiry is the EPPCodecComponent that knows how to encode and decode keyData elements from/to XML and object instance.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new instance of EPPKeyRelayExpiry.
    Create a new instance of EPPKeyRelayExpiry with a a relative expiry.
    Create a new instance of EPPKeyRelayExpiry with an absolute expiry date and time.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPKeyRelayExpiry.
    void
    decode(Element aElement)
    Populate the data of this instance with the data stored in the given Element of the DOM tree
    encode(Document aDocument)
    Append all data from this secDNS:keyData to the given DOM Document
    boolean
    equals(Object aObject)
    implements a deep EPPKeyRelayExpiry compare.
    Gets the absolute expiry date and time.
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the relative expiry duration from the current time.
    void
    setAbsolute(Date aAbsolute)
    Sets the absolute expiry date and time.
    void
    setRelative(Duration aRelative)
    Sets the relative expiry duration from the current time.
    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
  • Constructor Details

    • EPPKeyRelayExpiry

      public EPPKeyRelayExpiry()
      Create a new instance of EPPKeyRelayExpiry.
    • EPPKeyRelayExpiry

      public EPPKeyRelayExpiry(Date aAbsolute)
      Create a new instance of EPPKeyRelayExpiry with an absolute expiry date and time.
      Parameters:
      aAbsolute - Absolute expiry date and time
    • EPPKeyRelayExpiry

      public EPPKeyRelayExpiry(Duration aRelative)
      Create a new instance of EPPKeyRelayExpiry with a a relative expiry.
      Parameters:
      aRelative - Relative expiry with a duration from the current time
  • Method Details

    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Append all data from this secDNS:keyData to the given DOM Document
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - The DOM Document to append data to
      Returns:
      Encoded DOM Element
      Throws:
      EPPEncodeException - Thrown when errors occur during the encode attempt or if the instance is invalid.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Populate the data of this instance with the data stored in the given Element of the DOM tree
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - The root element of the fragment of XML
      Throws:
      EPPDecodeException - Thrown if any errors occur during decoding.
    • getAbsolute

      public Date getAbsolute()
      Gets the absolute expiry date and time.
      Returns:
      the absolute expiry date and time if defined; null otherwise
    • setAbsolute

      public void setAbsolute(Date aAbsolute)
      Sets the absolute expiry date and time.
      Parameters:
      aAbsolute - Absolute expiry date and time
    • getRelative

      public Duration getRelative()
      Gets the relative expiry duration from the current time.
      Returns:
      Relative expiry duration from the current time if defined; null otherwise
    • setRelative

      public void setRelative(Duration aRelative)
      Sets the relative expiry duration from the current time.
      Parameters:
      aRelative - Relative expiry duration from the current time
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPKeyRelayExpiry compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPKeyRelayExpiry instance to compare with
      Returns:
      true if equal false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPKeyRelayExpiry.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPKeyRelayExpiry
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • 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.