Package com.verisign.epp.codec.gen
Class EPPService
- java.lang.Object
-
- 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 theEPPCodec
. A service contains an XML namespace prefix, an XML namespace URI, and an XML Schema location. Each concreteEPPMapFactory
is associated with anEPPService
that is used as a descriptor of the service. The list of supportedEPPServices
can be retreived from theEPPFactory
An EPPService is a member of different EPP Messages including theEPPGreeting
and theEPPLoginCmd
. AnEPPService
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:
EPPFactory
,EPPMapFactory
,EPPGreeting
,EPPLoginCmd
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXT_SERVICE
The service is an extension servicestatic int
OBJ_SERVICE
The service is an object serviceint
serviceType
Defines the type of service as either OBJ_SERVICE or EXT_SERVICE.
-
Constructor Summary
Constructors Constructor Description EPPService()
EPPService(java.lang.String aNamespacePrefix, java.lang.String aNamespaceURI)
Allocates a newEPPService
and sets all of the required attributes to the arguments values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPService
.void
decode(org.w3c.dom.Element aElement)
decodeEPPService
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPService
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPService
compare.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.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.int
getServiceType()
Gets the service type associcted with this servicevoid
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
setServiceType(int aServiceType)
Set the service type associated with this servicejava.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
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)
Allocates a newEPPService
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 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 URIString
-
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 prefixString
-
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
encodeEPPService
into a DOM element tree. The "prefix:service" element is created and the attribute values are appended as XML attributes.- Specified by:
encode
in interfaceEPPCodecComponent
- 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
decodeEPPService
from a DOM element tree. TheaElement
argument needs to be the "prefix:service" element.- Specified by:
decode
in interfaceEPPCodecComponent
- 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 deepEPPService
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPService
instance to compare with- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPService
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPService
- 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
.
-
-