Class EPPService

java.lang.Object
com.verisign.epp.codec.gen.EPPService
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPService extends Object implements EPPCodecComponent
Identifies an EPP Command Mapping service supported by the EPPCodec. A service contains an XML namespace prefix, an XML namespace URI, and an XML Schema location. Each concrete EPPMapFactory is associated with an EPPService that is used as a descriptor of the service. The list of supported EPPServices can be retreived from the EPPFactory An EPPService is a member of different EPP Messages including the EPPGreeting and the EPPLoginCmd. An EPPService is encoded into an individual XML element with a tag name of XML namespace prefix:service and the XML attributes set to the attribute values.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The service is an extension service
    static final int
    The service is an object service
    int
    Defines the type of service as either OBJ_SERVICE or EXT_SERVICE.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    EPPService(String aNamespacePrefix, String aNamespaceURI)
    Allocates a new EPPService and sets all of the required attributes to the arguments values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPService.
    void
    decode(Element aElement)
    decode EPPService from a DOM element tree.
    encode(Document aDocument)
    encode EPPService into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPService compare.
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the XML namespace prefix associated with the service.
    Gets the XML namespace URI associated with the service.
    int
    Gets the service type associcted with this service
    void
    setNamespacePrefix(String aNamespacePrefix)
    Set the XML namespace prefix associated with the service.
    void
    setNamespaceURI(String aNamespaceURI)
    Set the XML namespace URI associated with the service.
    void
    setServiceType(int aServiceType)
    Set the service type associated with this service
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • OBJ_SERVICE

      public static final int OBJ_SERVICE
      The service is an object service
      See Also:
    • EXT_SERVICE

      public static final int EXT_SERVICE
      The service is an extension service
      See Also:
    • serviceType

      public int serviceType
      Defines the type of service as either OBJ_SERVICE or EXT_SERVICE. Default is OBJ_SERVICE.
  • Constructor Details

    • EPPService

      public EPPService()
    • EPPService

      public EPPService(String aNamespacePrefix, String aNamespaceURI)
      Allocates a new EPPService and sets all of the required attributes to the arguments values.
      Parameters:
      aNamespacePrefix - XML Namespace prefix for the service. For example, The Domain Mapping prefix is "domain".
      aNamespaceURI - XML Namespace URI for the service. For example, The Domain Mapping URI is "urn:iana:xmlns:domain".
  • Method Details

    • getNamespaceURI

      public String getNamespaceURI()
      Gets the XML namespace URI associated with the service.
      Returns:
      XML namespace URI String if defined; null otherwise.
    • setNamespaceURI

      public void setNamespaceURI(String aNamespaceURI)
      Set the XML namespace URI associated with the service.
      Parameters:
      aNamespaceURI - XML namespace URI String
    • getNamespacePrefix

      public String getNamespacePrefix()
      Gets the XML namespace prefix associated with the service.
      Returns:
      XML namespace prefix String if defined; null otherwise.
    • setNamespacePrefix

      public void setNamespacePrefix(String aNamespacePrefix)
      Set the XML namespace prefix associated with the service.
      Parameters:
      aNamespacePrefix - XML namespace prefix String
    • setServiceType

      public void setServiceType(int aServiceType)
      Set the service type associated with this service
      Parameters:
      aServiceType - .
    • getServiceType

      public int getServiceType()
      Gets the service type associcted with this service
      Returns:
      servicetype int ; null otherwise.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPService into a DOM element tree. The "prefix:service" element is created and the attribute values are appended as XML attributes.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOCUMENT ME!
      Returns:
      service root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPService from a DOM element tree. The aElement argument needs to be the "prefix:service" element.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - The "prefix:service" XML element.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPService compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPService instance to compare with
      Returns:
      DOCUMENT ME!
    • clone

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