Class EPPMaintenanceDescription

java.lang.Object
com.verisign.epp.codec.maintenance.v1_0.EPPMaintenanceDescription
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPMaintenanceDescription extends 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:
  • Field Details

  • Constructor Details

    • EPPMaintenanceDescription

      public EPPMaintenanceDescription()
      Default constructor for EPPMaintenanceDescription. The required attributes need to be set. The type attribute defaults to EPPMaintenanceDescription.Type.plain and the lang attribute defaults to DEFAULT_LANG.
    • EPPMaintenanceDescription

      public EPPMaintenanceDescription(String aDescription)
      Constructor for EPPMaintenanceDescription with the required attribute as a parameter.
      Parameters:
      aDescription - Description value
    • EPPMaintenanceDescription

      public EPPMaintenanceDescription(String aDescription, EPPMaintenanceDescription.Type aType, String aLang)
      Constructor for EPPMaintenanceDescription with all of the attributes as parameters.
      Parameters:
      aDescription - Description value
      aType - Type of the description
      aLang - Language of the description
  • Method Details

    • getDescription

      public 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(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 String getLang()
      Gets the description language value.
      Returns:
      Description language if defined; DEFAULT_LANG otherwise.
    • setLang

      public void setLang(String aLang)
      Sets the description language value.
      Parameters:
      aLang - Description language for value.
    • 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 Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPMaintenanceDescription instance.
      Specified by:
      encode in interface EPPCodecComponent
      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 encode EPPMaintenanceDescription instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPMaintenanceDescription attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPMaintenanceDescription from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • equals

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

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