|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.codec.gen.EPPFactory
public class EPPFactory
EPPFactory
is a Singleton class that will create
EPPCommand
or EPPResponse
instances for any
of the supported EPP Command Mappings (e.g. domain, host, contact). When a
create method is called, EPPFactory
will use the XML namespace
of the element to call the appropriate concrete
EPPMapFactory
, which will create the correct concrete
EPPCommand
or EPPResponse
.
createCommand(String, String)
is provided to instantiate
EPPCommand
objects associated with the general EPP
Specification, which includes EPPLoginCmd
and
EPPLogout
.
EPPFactory
is initialized with the set of available EPP Command
Mappings. A method is provided to retrieve the list
EPPService
descriptions of available EPP Command Mappings.
The list of available EPP Command Mappings can be used in
EPPGreeting
and in EPPLoginCmd
.
EPPMapFactory
,
EPPGreeting
,
EPPLoginCmd
Constructor Summary | |
---|---|
protected |
EPPFactory()
Protected constructor following the Singleton Design Pattern. |
Method Summary | |
---|---|
void |
addExtFactory(java.lang.String aExtFactory)
Add a concrete EPPExtFactory if it does not already exist
in EPPFactory . |
void |
addMapFactory(java.lang.String aMapFactory)
Add a concrete EPPMapFactory if it does not already exist
in EPPFactory . |
EPPCommand |
createCommand(org.w3c.dom.Element aMapElement)
creates a concrete EPPCommand given a DOM Command Mapping
Element. |
EPPCommand |
createCommand(java.lang.String aCommandType,
java.lang.String aOp)
creates a concrete EPPCommand given a command type and
a command operation. |
EPPCodecComponent |
createExtension(org.w3c.dom.Element aExtensionElm)
creates a concrete EPPCommand given a DOM Command Mapping
Element. |
EPPProtocolExtension |
createProtocolExtension(org.w3c.dom.Element aExtensionElm)
creates a concrete EPPProtocolExtension given a DOM
protocol extension Element. |
EPPResponse |
createResponse(org.w3c.dom.Element aMapElement)
creates a concrete EPPResponse given a DOM Command Mapping
Element. |
java.util.Vector |
getExtensions()
Gets a Vector of EPPService objects that represent the supported EPP Extensions. |
static EPPFactory |
getInstance()
Singleton Design Pattern method to retrieve the single EPPFactory instance. |
java.util.Vector |
getServices()
Gets a Vector of EPPService objects that represent the supported EPP Command Mappings. |
java.util.Set |
getXmlSchemas()
Gets the list of XML schemas that need to be pre-loaded into the XML Parser. |
boolean |
hasExtension(java.lang.String aNamespace)
Does the EPP support an extension specified by the namespace URI? |
boolean |
hasService(java.lang.String aNamespace)
Does the EPP support a service specified by the service namespace URI? |
void |
init(java.util.Vector someFactories)
Initialize the Singleton EPP instance with the list of available concrete EPPMapFactory's. |
void |
init(java.util.Vector someFactories,
java.util.Vector someExtFactories)
Initialize the Singleton EPP instance with the list of available concrete EPPMapFactory 's and concrete
EPPExtFactory 's. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EPPFactory()
Method Detail |
---|
public static EPPFactory getInstance()
EPPFactory
instance.
EPPFactory
instance.public EPPCommand createCommand(java.lang.String aCommandType, java.lang.String aOp) throws EPPCodecException
EPPCommand
given a command type and
a command operation. This method should only be used for commands
that don't have an EPP Namespace extension. The only commands
currently supported include EPPCommand.TYPE_LOGIN
and
EPPCommand.EPP_LOGOUT
.
aCommandType
- Command.TYPE_
constant associated with
the EPPCommand
.aOp
- Command.OP_
constant associated with
EPPCommand
. This should be null
if there is no operation value associated with the command.
EPPCodecException
- Unable to create command map.public EPPCommand createCommand(org.w3c.dom.Element aMapElement) throws EPPCodecException
EPPCommand
given a DOM Command Mapping
Element. The DOM Command Mapping Element must have an XML
namespace URI, which is used to determine the concrete
EPPMapFactory
to use to create the
EPPCommand
.
aMapElement
- The DOM Element associated with the command mapping.
EPPCommand
associated with
aMapElement
parameter.
EPPCodecException
- Unable to create concrete
EPPCommand
.public EPPResponse createResponse(org.w3c.dom.Element aMapElement) throws EPPCodecException
EPPResponse
given a DOM Command Mapping
Element. The DOM Command Mapping Element must have an XML
Namespace URI, which is used to determine the concrete
EPPMapFactory
to use to create the
EPPResponse
.
aMapElement
- The DOM Element associated with the command mapping.
EPPResponse
associated with
aMapElement
parameter.
EPPCodecException
- Unable to create concrete
EPPCommand
.public EPPCodecComponent createExtension(org.w3c.dom.Element aExtensionElm) throws EPPCodecException
EPPCommand
given a DOM Command Mapping
Element. The DOM Command Mapping Element must have an XML
namespace URI, which is used to determine the concrete
EPPMapFactory
to use to create the
EPPCommand
.
aExtensionElm
- The DOM Element associated with the command
mapping.
EPPCommand
associated with
aMapElement
parameter.
EPPCodecException
- Unable to create concrete
EPPCommand
.public EPPProtocolExtension createProtocolExtension(org.w3c.dom.Element aExtensionElm) throws EPPCodecException
EPPProtocolExtension
given a DOM
protocol extension Element. The extension element must have an XML
namespace URI, which is used to determine the concrete
EPPExtFactory
to use to create the
EPPProtocolExtension
.
aExtensionElm
- The Protocol extension Element .
EPPCodecException
- Unable to create concrete
EPPCommand
.public java.util.Vector getServices()
public java.util.Vector getExtensions()
EPPService
. object that contains
information about the extension.
Vector
of EPPService
objects, each
representing an EPP Extension.public boolean hasService(java.lang.String aNamespace)
aNamespace
- XML Namespace URI associated with service. For
example "urn:iana:xmlns:domain" for the Domain Command
Mapping.
true
if EPP supports the service;
false
otherwise.public boolean hasExtension(java.lang.String aNamespace)
aNamespace
- XML Namespace URI associated with extension. For
example "urn:verisign:xmlns:pricing" for the Domain Command
Mapping.
true
if EPP supports the extension;
false
otherwise.public void init(java.util.Vector someFactories) throws EPPCodecException
EPPFactory
with
the following calls:Vector theFactories = new Vector(); theFactories.addElement("com.verisign.epp.codec.domain.EPPDomainMapFactory"); EPPFactory.getInstance().init(theFactories);
someFactories
- a Vector of concrete EPPMapFactory
fully qualified class names.
EPPCodecException
- Error initializing EPPFactory
public void init(java.util.Vector someFactories, java.util.Vector someExtFactories) throws EPPCodecException
EPPMapFactory
's and concrete
EPPExtFactory
's. The concrete
EPPMapFactory
's and EPPExtFactory
's are
specified by their fully qualified class names. For example, the
EPPDomainMapFactory and EPPPricingExtFactory can be initialized in
EPPFactory
with the following calls:Vector theMapFactories = new Vector(); theMapFactories.addElement("com.verisign.epp.codec.domain.EPPDomainMapFactory"); theExtFactories = new Vector(); theExtFactories.addElement("com.verisign.epp.codec.pricing.EPPPricingExtFactory"); EPPFactory.getInstance().init(theMapFactories, theExtFactories);
someFactories
- a Vector
of concrete
EPPMapFactory
fully qualified class names.someExtFactories
- a Vector
of concrete
EPPExtFactory
fully qualified class names.
EPPCodecException
- Error initializing EPPFactory
public void addMapFactory(java.lang.String aMapFactory) throws EPPCodecException
EPPMapFactory
if it does not already exist
in EPPFactory
.
aMapFactory
- a concrete EPPMapFactory
fully qualified
class names.
EPPCodecException
- Error add EPPMapFactory
to
EPPFactory
.public void addExtFactory(java.lang.String aExtFactory) throws EPPCodecException
EPPExtFactory
if it does not already exist
in EPPFactory
.
aExtFactory
- a concrete EPPExtFactory
fully qualified
class names.
EPPCodecException
- Error add EPPExtFactory
to
EPPFactory
.public java.util.Set getXmlSchemas()
EPPMapFactory
and EPPExtFactory
include
a list of XML schemas that need to be loaded into the XML Parser, so
getXmlSchemas()
will aggregate them into a single List
.
Each XML schemas should not include the path, since the schema will be
loaded as a resource from schemas folder of the classpath.
Set
of String
XML Schema names that
should be pre-loaded in the XML Parser. For example, at a minimum,
the following two XML schemas will be returned:eppcom-1.0.xsd
epp-1.0.xsd
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |