Class EPPMaintenanceDescription
- java.lang.Object
-
- com.verisign.epp.codec.maintenance.v1_0.EPPMaintenanceDescription
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPMaintenanceDescription extends java.lang.Object implements EPPCodecComponent
EPPMaintenanceDescription
is a free-form descriptions of the maintenance without having to create and traverse an external resource defined by the <maint:detail> element. The OPTIONAL "lang" attribute MAY be present to identify the language if the negotiated value is something other then the default value of "en" (English). The OPTIONAL "type" attribute MAY be present to identify the format of the description. It MUST either be "plain" for plain text or "html" HTML text that is defined in [W3C-HTML5] and XML-escaped, with a default value of "plain".- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPPMaintenanceDescription.Type
Description type enumerated values.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LANG
Default languagestatic java.lang.String
ELM_LOCALNAME
XML local name forEPPMaintenanceDescription
.static java.lang.String
ELM_NAME
XML root tag forEPPMaintenance
.
-
Constructor Summary
Constructors Constructor Description EPPMaintenanceDescription()
Default constructor forEPPMaintenanceDescription
.EPPMaintenanceDescription(java.lang.String aDescription)
Constructor forEPPMaintenanceDescription
with the required attribute as a parameter.EPPMaintenanceDescription(java.lang.String aDescription, EPPMaintenanceDescription.Type aType, java.lang.String aLang)
Constructor forEPPMaintenanceDescription
with all of the attributes as parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPMaintenanceDescription
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPMaintenanceDescription
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPMaintenanceDescription
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPMaintenanceDescription
compare.java.lang.String
getDescription()
Gets the free-form description of the maintenance without having to create an external resource.java.lang.String
getLang()
Gets the description language value.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.EPPMaintenanceDescription.Type
getType()
Gets the description type value.boolean
hasLang()
Is the description language defined with a non-default value?void
setDescription(java.lang.String aDescription)
Sets the free-form description of the maintenance without having to create an external resource.void
setLang(java.lang.String aLang)
Sets the description language value.void
setType(EPPMaintenanceDescription.Type aType)
Sets the description type value.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
Default language- See Also:
- Constant Field Values
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPMaintenanceDescription
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPMaintenance
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMaintenanceDescription
public EPPMaintenanceDescription()
Default constructor forEPPMaintenanceDescription
. The required attributes need to be set. Thetype
attribute defaults toEPPMaintenanceDescription.Type.plain
and thelang
attribute defaults toDEFAULT_LANG
.
-
EPPMaintenanceDescription
public EPPMaintenanceDescription(java.lang.String aDescription)
Constructor forEPPMaintenanceDescription
with the required attribute as a parameter.- Parameters:
aDescription
- Description value
-
EPPMaintenanceDescription
public EPPMaintenanceDescription(java.lang.String aDescription, EPPMaintenanceDescription.Type aType, java.lang.String aLang)
Constructor forEPPMaintenanceDescription
with all of the attributes as parameters.- Parameters:
aDescription
- Description valueaType
- Type of the descriptionaLang
- Language of the description
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Gets the free-form description of the maintenance without having to create an external resource.- Returns:
- The free-form description of the maintenance if defined;
null
otherwise.
-
setDescription
public void setDescription(java.lang.String aDescription)
Sets the free-form description of the maintenance without having to create an external resource.- Parameters:
aDescription
- Free-form description of the maintenance without having to create an external resource.
-
hasLang
public boolean hasLang()
Is the description language defined with a non-default value?- Returns:
true
if the description language is defined;false
otherwise.
-
getLang
public java.lang.String getLang()
Gets the description language value.- Returns:
- Description language if defined;
DEFAULT_LANG
otherwise.
-
setLang
public void setLang(java.lang.String aLang)
Sets the description language value.- Parameters:
aLang
- Description language for value.
-
getType
public EPPMaintenanceDescription.Type getType()
Gets the description type value.- Returns:
- Description type with a default value of
EPPMaintenanceDescription.Type.plain
.
-
setType
public void setType(EPPMaintenanceDescription.Type aType)
Sets the description type value.- Parameters:
aType
- Description type value.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPMaintenanceDescription
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPMaintenanceDescription
instance. - Throws:
EPPEncodeException
- Unable to encodeEPPMaintenanceDescription
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPMaintenanceDescription
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPMaintenanceDescription
from.- Throws:
EPPDecodeException
- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMaintenanceDescription
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPMaintenanceDescription
instance to compare with- Returns:
true
ofaObject
is equal to instance;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPMaintenanceDescription
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPMaintenanceDescription
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-