com.verisign.epp.codec.gen
Class EPPService

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

public class EPPService
extends java.lang.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.

Version:
$Revision: 1.2 $
Author:
$Author: jim $
See Also:
EPPFactory, EPPMapFactory, EPPGreeting, EPPLoginCmd, Serialized Form

Field Summary
static int EXT_SERVICE
          The service is an extension service
static int OBJ_SERVICE
          The service is an object service
 int serviceType
          Defines the type of service as either OBJ_SERVICE or EXT_SERVICE.
 
Constructor Summary
EPPService()
           
EPPService(java.lang.String aNamespacePrefix, java.lang.String aNamespaceURI, java.lang.String aSchemaLocation)
          Allocates a new EPPService and sets all of the required attributes to the arguments values.
 
Method Summary
 java.lang.Object clone()
          Clone EPPService.
 void decode(org.w3c.dom.Element aElement)
          decode EPPService from a DOM element tree.
 org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
          encode EPPService into a DOM element tree.
 boolean equals(java.lang.Object aObject)
          implements a deep EPPService compare.
 java.lang.String getNamespacePrefix()
          Gets the XML namespace prefix associated with the service.
 java.lang.String getNamespaceURI()
          Gets the XML namespace URI associated with the service.
 java.lang.String getSchemaLocation()
          Gets the XML Schema location associated with the service.
 int getServiceType()
          Gets the service type associcted with this service
 void setNamespacePrefix(java.lang.String aNamespacePrefix)
          Set the XML namespace prefix associated with the service.
 void setNamespaceURI(java.lang.String aNamespaceURI)
          Set the XML namespace URI associated with the service.
 void setSchemaLocation(java.lang.String aSchemaLocation)
          Set the XML Schema location associated with the service.
 void setServiceType(int aServiceType)
          Set the service type associated with this service
 java.lang.String toString()
          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 Detail

OBJ_SERVICE

public static final int OBJ_SERVICE
The service is an object service

See Also:
Constant Field Values

EXT_SERVICE

public static final int EXT_SERVICE
The service is an extension service

See Also:
Constant Field Values

serviceType

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

Constructor Detail

EPPService

public EPPService()

EPPService

public EPPService(java.lang.String aNamespacePrefix,
                  java.lang.String aNamespaceURI,
                  java.lang.String aSchemaLocation)
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".
aSchemaLocation - The location of the XML Schema. For example, the Domain Mapping Schema Location is "urn:iana:xmlns:domain domain.xsd".
Method Detail

getNamespaceURI

public java.lang.String getNamespaceURI()
Gets the XML namespace URI associated with the service.

Returns:
XML namespace URI String if defined; null otherwise.

setNamespaceURI

public void setNamespaceURI(java.lang.String aNamespaceURI)
Set the XML namespace URI associated with the service.

Parameters:
aNamespaceURI - XML namespace URI String

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Gets the XML namespace prefix associated with the service.

Returns:
XML namespace prefix String if defined; null otherwise.

setNamespacePrefix

public void setNamespacePrefix(java.lang.String aNamespacePrefix)
Set the XML namespace prefix associated with the service.

Parameters:
aNamespacePrefix - XML namespace prefix String

getSchemaLocation

public java.lang.String getSchemaLocation()
Gets the XML Schema location associated with the service.

Returns:
XML Schema location String if defined; null otherwise.

setSchemaLocation

public void setSchemaLocation(java.lang.String aSchemaLocation)
Set the XML Schema location associated with the service.

Parameters:
aSchemaLocation - XML Schema location 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 org.w3c.dom.Element encode(org.w3c.dom.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(org.w3c.dom.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(java.lang.Object aObject)
implements a deep EPPService compare.

Overrides:
equals in class java.lang.Object
Parameters:
aObject - EPPService instance to compare with
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone EPPService.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class java.lang.Object
Returns:
clone of EPPService
Throws:
java.lang.CloneNotSupportedException - standard Object.clone exception

toString

public java.lang.String toString()
Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

Overrides:
toString in class java.lang.Object
Returns:
Indented XML String if successful; ERROR otherwise.


Copyright © VeriSign Inc. All Rights Reserved.