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,Serializable,Cloneable
- Direct Known Subclasses:
EPPTtlCreate,EPPTtlInfData,EPPTtlUpdate
Abstract base class for the TTL extensions of the create and update commands
and the info response, which all accept a list of
EPPTtl objects.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPTtlExtension.EPPTtlExtension(EPPTtl aTtl) Constructor forEPPTtlExtensionthat takes a single TTL.EPPTtlExtension(List<EPPTtl> aTtls) Constructor forEPPTtlExtensionthat a list of TTLs. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a TTL to the list of TTLs.clone()clone anEPPCodecComponent.voidDecode a DOM element tree to initialize the instance attributes.Encode instance into a DOM element tree.booleanCompare an instance ofEPPTtlExtensionwith this instance.protected abstract StringAbstract method that the sub-class must define to return the local name for the root element.getTtls()Gets the list of TTLs if defined.booleanhasTtls()Are the TTLs defined?voidSets the list of TTLs.toString()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, waitMethods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
Constructor Details
-
EPPTtlExtension
public EPPTtlExtension()Default constructor forEPPTtlExtension. -
EPPTtlExtension
Constructor forEPPTtlExtensionthat takes a single TTL.- Parameters:
aTtl- A single TTL value
-
EPPTtlExtension
Constructor forEPPTtlExtensionthat a list of TTLs.- Parameters:
aTtls- A list of TTLs
-
-
Method Details
-
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
Gets the list of TTLs if defined.- Returns:
- List of TTLs if defined; empty list otherwise.
-
addTtl
Adds a TTL to the list of TTLs.- Parameters:
aTtl- The TTL to add.
-
setTtls
Sets the list of TTLs.- Parameters:
aTtls- The TTLs to set.
-
encode
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:
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
Decode 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
clone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of concrete
EPPTtlExtension - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
equals
Compare an instance ofEPPTtlExtensionwith this instance.
-