EPP 0.2.5

com.neulevel.epp.core.command
Class EppCommand

java.lang.Object
  |
  +--com.neulevel.epp.core.EppEntity
        |
        +--com.neulevel.epp.core.command.EppCommand
Direct Known Subclasses:
EppCommandCheck, EppCommandCreate, EppCommandDelete, EppCommandInfo, EppCommandLogin, EppCommandLogout, EppCommandPoll, EppCommandRenew, EppCommandTransfer, EppCommandUpdate

public abstract class EppCommand
extends EppEntity

This EppCommand class implements EPP Command entity.

Version:
$Revision: 1.1 $ $Date: 2001/11/05 20:20:36 $
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
protected  java.lang.String clTRID
          The client transaction id associated with the EPP Command
protected  EppCreds creds
          The EPP Credentials associated with the EPP Command (optional)
protected  EppUnspec unspec
          Any extension data associated with the EPP Command (optional)
 
Constructor Summary
EppCommand()
           
 
Method Summary
static EppCommandCheck check(int objectType, java.lang.String xid)
          Creates an EppCommandCheck object based on the object type.
static EppCommandCreate create(EppObject object, java.lang.String xid)
          Creates an EppCommandCreate object.
static EppCommandDelete delete(int objectType, java.lang.String objectId, java.lang.String xid)
          Creates an EppCommandDelete object based on the object type.
static EppEntity fromXML(org.w3c.dom.Node root)
          Converts an XML element into an EppCommand object.
 java.lang.String getClientTransactionId()
          Gets transaction id from the registrar client
 EppCreds getCreds()
          Gets command credentials
 EppUnspec getUnspec()
          Gets optional unspecified object
static EppCommandInfo info(int objectType, java.lang.String objectId, java.lang.String xid)
          Creates an EppCommandInfo object based on the object type.
static EppCommandRenew renew(int objectType, java.lang.String objectId, java.lang.String xid)
          Creates an EppCommandRenew object based on the object type.
 void setClientTransactionId(java.lang.String xid)
          Sets transaction id from the registrar client
 void setCreds(EppCreds creds)
          Sets command credentials
 void setUnspec(EppUnspec unspec)
          Sets optional unspecified object
protected  org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc, java.lang.String command, org.w3c.dom.Element element)
          Converts the shared EppCommand components into an XML element.
protected  org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc, java.lang.String command, org.w3c.dom.Element element, java.util.Vector attrList)
          Converts the shared EppCommand components into an XML element.
protected  org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc, java.lang.String command, EppEntity object)
          Converts the shared EppCommand components into an XML element.
protected  org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc, java.lang.String command, java.lang.Object object, java.lang.String tag, java.util.Vector attrList)
          Converts the shared EppCommand components into an XML element
static EppCommandTransfer transfer(int objectType, java.lang.String objectId, java.lang.String xid)
          Creates an EppCommandTransfer object based on the object type.
static EppCommandUpdate update(int objectType, java.lang.String objectId, java.lang.String xid)
          Creates an EppCommandUpdate object based on the object type.
 
Methods inherited from class com.neulevel.epp.core.EppEntity
toString, toString, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

creds

protected EppCreds creds
The EPP Credentials associated with the EPP Command (optional)

unspec

protected EppUnspec unspec
Any extension data associated with the EPP Command (optional)

clTRID

protected java.lang.String clTRID
The client transaction id associated with the EPP Command
Constructor Detail

EppCommand

public EppCommand()
Method Detail

getCreds

public EppCreds getCreds()
Gets command credentials

setCreds

public void setCreds(EppCreds creds)
Sets command credentials

getUnspec

public EppUnspec getUnspec()
Gets optional unspecified object

setUnspec

public void setUnspec(EppUnspec unspec)
Sets optional unspecified object

getClientTransactionId

public java.lang.String getClientTransactionId()
Gets transaction id from the registrar client

setClientTransactionId

public void setClientTransactionId(java.lang.String xid)
Sets transaction id from the registrar client

toXMLCommon

protected org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc,
                                          java.lang.String command,
                                          org.w3c.dom.Element element)
Converts the shared EppCommand components into an XML element. The command must be object specific commands such as create/delete/query, etc.
Parameters:
doc - the XML Document object
command - the tag/element name for the EppCommand object
element - the Element associated with the command
Returns:
an Element object

toXMLCommon

protected org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc,
                                          java.lang.String command,
                                          org.w3c.dom.Element element,
                                          java.util.Vector attrList)
Converts the shared EppCommand components into an XML element. The command must be object specific commands such as create/delete/query, etc.
Parameters:
doc - the XML Document object
command - the tag/element name for the EppCommand object
element - the Element associated with the command
attrList - the Attr list associated with the command
Returns:
an Element object

toXMLCommon

protected org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc,
                                          java.lang.String command,
                                          EppEntity object)
Converts the shared EppCommand components into an XML element. The command must be object specific commands such as create/delete/query, etc.
Parameters:
doc - the XML Document object
command - the tag/element name for the EppCommand object
object - the EppObject associated with the command. the type of the object should be either EppEntity or Element
Returns:
an Element object

toXMLCommon

protected org.w3c.dom.Element toXMLCommon(org.w3c.dom.Document doc,
                                          java.lang.String command,
                                          java.lang.Object object,
                                          java.lang.String tag,
                                          java.util.Vector attrList)
Converts the shared EppCommand components into an XML element
Parameters:
doc - the XML Document object
command - the tag/element name for the EppCommand object
object - the Object associated with the command. the type of the object should be either EppEntity or Element
tag - the tag indicating if the command is generic, such as login/logout
attrList - the Attr list associated with the command
Returns:
an Element object

fromXML

public static EppEntity fromXML(org.w3c.dom.Node root)
Converts an XML element into an EppCommand object. The caller of this method must make sure that the root node is of an EPP Command entity.
Parameters:
root - root node for an EppCommand object in XML format
Returns:
an EppEntity object, or null if the node is invalid

create

public static EppCommandCreate create(EppObject object,
                                      java.lang.String xid)
Creates an EppCommandCreate object. This is a convience method for creating an EPP Object in the registry.
Parameters:
object - object to be created in the registry
xid - client transaction id associated with the operation
Returns:
an EppCommandCreate object, which could be one of the subclass of EppCommandCreate

check

public static EppCommandCheck check(int objectType,
                                    java.lang.String xid)
Creates an EppCommandCheck object based on the object type.
Parameters:
objectType - the type of objects to be checked. The value must be defined in EppObject, as one of the followings:
  • EppObject.CONTACT
  • EppObject.DOMAIN
  • EppObject.HOST
  • EppObject.SVCSUB
xid - client transaction id associated with the operation
Returns:
an EppCommandCheck object, which could be one of the subclass of EppCommandCheck; or null if the object type is invalid.

delete

public static EppCommandDelete delete(int objectType,
                                      java.lang.String objectId,
                                      java.lang.String xid)
Creates an EppCommandDelete object based on the object type.
Parameters:
objectType - the type of object to be deleted. The value must be defined in EppObject, as one of the followings:
  • EppObject.CONTACT
  • EppObject.DOMAIN
  • EppObject.HOST
  • EppObject.SVCSUB
objectId - the id associated with object to be deleted. The value is id for an EPP Contact object, domain name for an EPP Domain object, or host name for an EPP Host object, or service subscription id for an EPP Svcsub object
xid - client transaction id associated with the operation
Returns:
an EppCommandDelete object, which could be one of the subclass of EppCommandDelete; or null if the object type is invalid.

info

public static EppCommandInfo info(int objectType,
                                  java.lang.String objectId,
                                  java.lang.String xid)
Creates an EppCommandInfo object based on the object type.
Parameters:
objectType - the type of object to be queried. The value must be defined in EppObject, as one of the followings:
  • EppObject.CONTACT
  • EppObject.DOMAIN
  • EppObject.HOST
  • EppObject.SVCSUB
objectId - the id associated with object to be queried. The value is id for an EPP Contact object, domain name for an EPP Domain object, or host name for an EPP Host object, or service subscription id for an EPP Svcsub object
xid - client transaction id associated with the operation
Returns:
an EppCommandInfo object, which could be one of the subclass of EppCommandInfo; or null if the object type is invalid.

update

public static EppCommandUpdate update(int objectType,
                                      java.lang.String objectId,
                                      java.lang.String xid)
Creates an EppCommandUpdate object based on the object type.
Parameters:
objectType - the type of object to be updated. The value must be defined in EppObject, as one of the followings:
  • EppObject.CONTACT
  • EppObject.DOMAIN
  • EppObject.HOST
  • EppObject.SVCSUB
objectId - the id associated with object to be updated. The value is id for an EPP Contact object, domain name for an EPP Domain object, or host name for an EPP Host object, or service subscription id for an EPP Svcsub object
xid - client transaction id associated with the operation
Returns:
an EppCommandUpdate object, which could be one of the subclass of EppCommandUpdate; or null if the object type is invalid.

transfer

public static EppCommandTransfer transfer(int objectType,
                                          java.lang.String objectId,
                                          java.lang.String xid)
Creates an EppCommandTransfer object based on the object type.
Parameters:
objectType - the type of object to be transferred. The value must be defined in EppObject, as one of the followings:
  • EppObject.CONTACT
  • EppObject.DOMAIN
  • EppObject.SVCSUB
objectId - the id associated with object to be transferred. The value is id for an EPP Contact object, domain name for an EPP Domain object, or service subscription id for an EPP Svcsub object
xid - client transaction id associated with the operation
Returns:
an EppCommandTransfer object, which could be one of the subclass of EppCommandTransfer; or null if the object type is invalid.

renew

public static EppCommandRenew renew(int objectType,
                                    java.lang.String objectId,
                                    java.lang.String xid)
Creates an EppCommandRenew object based on the object type.
Parameters:
objectType - the type of object to be renewed. The value must be defined in EppObject, as one of the followings:
  • EppObject.DOMAIN
    • EppObject.SVCSUB
    objectId - the id associated with object to be renewed. The value is the domain name for an EPP Domain object, or service subscription id for an EPP Svcsub object
    xid - client transaction id associated with the operation
    Returns:
    an EppCommandRenew object, which could be one of the subclass of EppCommandRenew; or null if the object type is invalid.

EPP 0.2.5

Copyright © 2001-2002 NeuLevel, Inc. All Rights Reserved.