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
EPPMaintenanceDescriptionis 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 classEPPMaintenanceDescription.TypeDescription type enumerated values.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LANGDefault languagestatic java.lang.StringELM_LOCALNAMEXML local name forEPPMaintenanceDescription.static java.lang.StringELM_NAMEXML root tag forEPPMaintenance.
-
Constructor Summary
Constructors Constructor Description EPPMaintenanceDescription()Default constructor forEPPMaintenanceDescription.EPPMaintenanceDescription(java.lang.String aDescription)Constructor forEPPMaintenanceDescriptionwith the required attribute as a parameter.EPPMaintenanceDescription(java.lang.String aDescription, EPPMaintenanceDescription.Type aType, java.lang.String aLang)Constructor forEPPMaintenanceDescriptionwith all of the attributes as parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPMaintenanceDescription.voiddecode(org.w3c.dom.Element aElement)Decode theEPPMaintenanceDescriptionattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPMaintenanceDescriptioninstance.booleanequals(java.lang.Object aObject)implements a deepEPPMaintenanceDescriptioncompare.java.lang.StringgetDescription()Gets the free-form description of the maintenance without having to create an external resource.java.lang.StringgetLang()Gets the description language value.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.EPPMaintenanceDescription.TypegetType()Gets the description type value.booleanhasLang()Is the description language defined with a non-default value?voidsetDescription(java.lang.String aDescription)Sets the free-form description of the maintenance without having to create an external resource.voidsetLang(java.lang.String aLang)Sets the description language value.voidsetType(EPPMaintenanceDescription.Type aType)Sets the description type value.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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. Thetypeattribute defaults toEPPMaintenanceDescription.Type.plainand thelangattribute defaults toDEFAULT_LANG.
-
EPPMaintenanceDescription
public EPPMaintenanceDescription(java.lang.String aDescription)
Constructor forEPPMaintenanceDescriptionwith 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 forEPPMaintenanceDescriptionwith 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;
nullotherwise.
-
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:
trueif the description language is defined;falseotherwise.
-
getLang
public java.lang.String getLang()
Gets the description language value.- Returns:
- Description language if defined;
DEFAULT_LANGotherwise.
-
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 EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPMaintenanceDescriptioninstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPMaintenanceDescriptioninstance. - Throws:
EPPEncodeException- Unable to encodeEPPMaintenanceDescriptioninstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPMaintenanceDescriptionattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPMaintenanceDescriptionfrom.- Throws:
EPPDecodeException- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMaintenanceDescriptioncompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPMaintenanceDescriptioninstance to compare with- Returns:
trueofaObjectis equal to instance;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPMaintenanceDescription.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-