Package com.verisign.epp.codec.ttl.v1_0
Class EPPTtlExtension
- java.lang.Object
-
- com.verisign.epp.codec.ttl.v1_0.EPPTtlExtension
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
EPPTtlCreate,EPPTtlInfData,EPPTtlUpdate
public abstract class EPPTtlExtension extends java.lang.Object implements EPPCodecComponent
Abstract base class for the TTL extensions of the create and update commands and the info response, which all accept a list ofEPPTtlobjects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPTtlExtension()Default constructor forEPPTtlExtension.EPPTtlExtension(EPPTtl aTtl)Constructor forEPPTtlExtensionthat takes a single TTL.EPPTtlExtension(java.util.List<EPPTtl> aTtls)Constructor forEPPTtlExtensionthat a list of TTLs.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddTtl(EPPTtl aTtl)Adds a TTL to the list of TTLs.java.lang.Objectclone()clone anEPPCodecComponent.voiddecode(org.w3c.dom.Element aElement)Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode instance into a DOM element tree.booleanequals(java.lang.Object aObject)Compare an instance ofEPPTtlExtensionwith this instance.protected abstract java.lang.StringgetLocalName()Abstract method that the sub-class must define to return the local name for the root element.java.util.List<EPPTtl>getTtls()Gets the list of TTLs if defined.booleanhasTtls()Are the TTLs defined?voidsetTtls(java.util.List<EPPTtl> aTtls)Sets the list of TTLs.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
-
-
-
Constructor Detail
-
EPPTtlExtension
public EPPTtlExtension()
Default constructor forEPPTtlExtension.
-
EPPTtlExtension
public EPPTtlExtension(EPPTtl aTtl)
Constructor forEPPTtlExtensionthat takes a single TTL.- Parameters:
aTtl- A single TTL value
-
EPPTtlExtension
public EPPTtlExtension(java.util.List<EPPTtl> aTtls)
Constructor forEPPTtlExtensionthat a list of TTLs.- Parameters:
aTtls- A list of TTLs
-
-
Method Detail
-
getLocalName
protected abstract java.lang.String getLocalName()
Abstract method that the sub-class must define to return the local name for the root element.- Returns:
- Local name of the root element of the extensions.
-
hasTtls
public boolean hasTtls()
Are the TTLs defined?- Returns:
trueif the TTLs are defined;falseotherwise.
-
getTtls
public java.util.List<EPPTtl> getTtls()
Gets the list of TTLs if defined.- Returns:
- List of TTLs if defined; empty list otherwise.
-
addTtl
public void addTtl(EPPTtl aTtl)
Adds a TTL to the list of TTLs.- Parameters:
aTtl- The TTL to add.
-
setTtls
public void setTtls(java.util.List<EPPTtl> aTtls)
Sets the list of TTLs.- Parameters:
aTtls- The TTLs to set.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode 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:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException- Error encodingEPPTtlExtension
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode a DOM element tree to initialize the instance attributes. TheaElementargument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement-Elementto decode- Throws:
EPPDecodeException- Error decodingElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionclone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of concrete
EPPTtlExtension - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPTtlExtensionwith this instance.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
-