EPP 0.2.5

com.neulevel.epp.core
Class EppSvcsub

java.lang.Object
  |
  +--com.neulevel.epp.core.EppEntity
        |
        +--com.neulevel.epp.core.EppObject
              |
              +--com.neulevel.epp.core.EppSvcsub

public class EppSvcsub
extends EppObject

This EppSvcsub class implements EPP Svcsub objects. The EPP command mapping for EPP Svcsub objects can be found at http://epp-ver-04.sourceforge.net/IETF/EPP-04/draft-zhang-epp-svcsub-00.txt.

Version:
$Revision$
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
static java.lang.String CONTACT_TYPE_ADMIN
          Contact type for administration contact ("admin");
static java.lang.String CONTACT_TYPE_BILLING
          Contact type for billing contact ("billing");
static java.lang.String CONTACT_TYPE_BIZLOCK
          Contact type for BIZlock contact ("bizlock")
static java.lang.String CONTACT_TYPE_PRIMARY
          Contact type for technical contact ("primary")
static java.lang.String CONTACT_TYPE_SECONDARY
          Contact type for technical contact ("primary")
static java.lang.String CONTACT_TYPE_TECH
          Contact type for technical contact ("tech")
static java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
          Svcsub status - clientDeleteProhibited
static java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
          Svcsub status - clientRenewProhibited
static java.lang.String STATUS_CLIENT_SUSPENDED
          Svcsub status - clientSuspended
static java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
          Svcsub status - clientTransferProhibited
static java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
          Svcsub status - clientUpdateProhibited
static java.lang.String STATUS_INACTIVE
          Svcsub status - inactive
static java.lang.String STATUS_OK
          Svcsub status - ok
static java.lang.String STATUS_PENDING_DELETE
          Svcsub status - pendingDelete
static java.lang.String STATUS_PENDING_TRANSFER
          Svcsub status - pendingTransfer
static java.lang.String STATUS_PENDING_VERIFICATION
          Svcsub status - pendingVerification
static java.lang.String STATUS_SERVER_DELETE_PROHIBITED
          Svcsub status - serverDeleteProhibited
static java.lang.String STATUS_SERVER_RENEW_PROHIBITED
          Svcsub status - serverRenewProhibited
static java.lang.String STATUS_SERVER_SUSPENDED
          Svcsub status - serverSuspended
static java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
          Svcsub status - serverTransferProhibited
static java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
          Svcsub status - serverUpdateProhibited
 
Fields inherited from class com.neulevel.epp.core.EppObject
authInfo, clID, CONTACT, crDate, crID, DOMAIN, exDate, HOST, roid, status, SVCSUB, trDate, upDate, upID
 
Constructor Summary
EppSvcsub()
          Creates an EppSvcsub object
EppSvcsub(java.lang.String id)
          Creates an EppSvcsub object with a service subscription id
EppSvcsub(java.lang.String id, java.lang.String service)
          Creates an EppSvcsub object with a service subscription id and service name
 
Method Summary
 void addContact(EppContactType contact)
          Adds a contact for the subscription
 void addContact(java.lang.String id, java.lang.String type)
          Adds a contact for the subscription, given a contact id and its type
 void addParam(EppSvcsubParam param)
          Adds a service parameter to be associated with the subscription
 void addParam(java.lang.String name, java.lang.String value)
          Adds a service parameter to be associated with the subscription, given a paramater name and its value
static EppCommandCheckSvcsub check(java.lang.String xid)
          Creates an EppCommandCheckSvcsub object for checking the existance of EPP Svcsub objects in the registry.
static EppCommandDeleteSvcsub delete(java.lang.String name, java.lang.String xid)
          Creates an EppCommandDeleteSvcsub object for deleting an EPP Svcsub object from the registry.
static EppEntity fromXML(org.w3c.dom.Node root)
          Converts an XML element into an EppSvcsub object.
 java.util.Vector getContact()
          Gets a list of contacts associated with the subscription
 java.util.Vector getContactId(java.lang.String type)
          Extracts a list of the contact ids associated with the service subscription object based on the contact type
 java.lang.String getId()
          Gets the service subscription id
 java.util.Vector getParam()
          Gets a list of service parameters associated with the subscription
 java.util.Vector getParam(java.lang.String name)
          Extracts a list of the parameter values associated with the service subscription object based on the parameter name.
 java.util.Vector getParamValue(java.lang.String name)
          Extracts a list of the parameter values associated with the service subscription object based on the parameter name.
 EppPeriod getPeriod()
          Gets registration period for the subscription
 java.lang.String getRegistrant()
          Gets the contact id of the registrant which owns the subscription
 java.lang.String getService()
          Gets the service name
static EppCommandInfoSvcsub info(java.lang.String name, java.lang.String xid)
          Creates an EppCommandInfoSvcsub object for querying the details of an EPP Svcsub object
static EppCommandRenewSvcsub renew(java.lang.String name, java.util.Calendar curExpDate, EppPeriod period, java.lang.String xid)
          Creates an EppCommandRenewSvcsub object for renewing the registration of an EPP Svcsub object in the registry.
 void setId(java.lang.String id)
          Sets the service subscription id
 void setPeriod(EppPeriod period)
          Sets registration period for the subscription
 void setRegistrant(java.lang.String registrant)
          Sets the contact id of the registrant which owns the subscription
 void setService(java.lang.String service)
          Sets the service name
 java.lang.String toString()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc, java.lang.String tag)
          Converts the EppSvcsub object into an XML element
static EppCommandTransferSvcsub transfer(java.lang.String name, EppPeriod period, java.lang.String xid)
          Creates an EppCommandTransferSvcsub object for transfering an EPP Svcsub object in the registry.
static EppCommandUpdateSvcsub update(java.lang.String name, java.lang.String xid)
          Creates an EppCommandUpdateSvcsub object for updating an EPP Svcsub object in the registry.
 
Methods inherited from class com.neulevel.epp.core.EppObject
addStatus, create, fromXMLCommon, getAuthInfo, getClientId, getClientIdCreated, getClientIdUpdated, getDateCreated, getDateExpired, getDateTransferred, getDateUpdated, getRoid, getStatus, setAuthInfo, setClientId, setClientIdCreated, setClientIdUpdated, setDateCreated, setDateExpired, setDateTransferred, setDateUpdated, setRoid, toXMLCommon
 
Methods inherited from class com.neulevel.epp.core.EppEntity
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTACT_TYPE_ADMIN

public static final java.lang.String CONTACT_TYPE_ADMIN
Contact type for administration contact ("admin");

CONTACT_TYPE_BILLING

public static final java.lang.String CONTACT_TYPE_BILLING
Contact type for billing contact ("billing");

CONTACT_TYPE_TECH

public static final java.lang.String CONTACT_TYPE_TECH
Contact type for technical contact ("tech")

CONTACT_TYPE_PRIMARY

public static final java.lang.String CONTACT_TYPE_PRIMARY
Contact type for technical contact ("primary")

CONTACT_TYPE_SECONDARY

public static final java.lang.String CONTACT_TYPE_SECONDARY
Contact type for technical contact ("primary")

CONTACT_TYPE_BIZLOCK

public static final java.lang.String CONTACT_TYPE_BIZLOCK
Contact type for BIZlock contact ("bizlock")

STATUS_CLIENT_DELETE_PROHIBITED

public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
Svcsub status - clientDeleteProhibited

STATUS_CLIENT_SUSPENDED

public static final java.lang.String STATUS_CLIENT_SUSPENDED
Svcsub status - clientSuspended

STATUS_CLIENT_RENEW_PROHIBITED

public static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
Svcsub status - clientRenewProhibited

STATUS_CLIENT_TRANSFER_PROHIBITED

public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
Svcsub status - clientTransferProhibited

STATUS_CLIENT_UPDATE_PROHIBITED

public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
Svcsub status - clientUpdateProhibited

STATUS_INACTIVE

public static final java.lang.String STATUS_INACTIVE
Svcsub status - inactive

STATUS_OK

public static final java.lang.String STATUS_OK
Svcsub status - ok

STATUS_PENDING_DELETE

public static final java.lang.String STATUS_PENDING_DELETE
Svcsub status - pendingDelete

STATUS_PENDING_TRANSFER

public static final java.lang.String STATUS_PENDING_TRANSFER
Svcsub status - pendingTransfer

STATUS_PENDING_VERIFICATION

public static final java.lang.String STATUS_PENDING_VERIFICATION
Svcsub status - pendingVerification

STATUS_SERVER_DELETE_PROHIBITED

public static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
Svcsub status - serverDeleteProhibited

STATUS_SERVER_SUSPENDED

public static final java.lang.String STATUS_SERVER_SUSPENDED
Svcsub status - serverSuspended

STATUS_SERVER_RENEW_PROHIBITED

public static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
Svcsub status - serverRenewProhibited

STATUS_SERVER_TRANSFER_PROHIBITED

public static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
Svcsub status - serverTransferProhibited

STATUS_SERVER_UPDATE_PROHIBITED

public static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
Svcsub status - serverUpdateProhibited
Constructor Detail

EppSvcsub

public EppSvcsub()
Creates an EppSvcsub object

EppSvcsub

public EppSvcsub(java.lang.String id)
Creates an EppSvcsub object with a service subscription id

EppSvcsub

public EppSvcsub(java.lang.String id,
                 java.lang.String service)
Creates an EppSvcsub object with a service subscription id and service name
Method Detail

getId

public java.lang.String getId()
Gets the service subscription id

setId

public void setId(java.lang.String id)
Sets the service subscription id

getService

public java.lang.String getService()
Gets the service name

setService

public void setService(java.lang.String service)
Sets the service name

getParam

public java.util.Vector getParam()
Gets a list of service parameters associated with the subscription

getParam

public java.util.Vector getParam(java.lang.String name)
Extracts a list of the parameter values associated with the service subscription object based on the parameter name.

addParam

public void addParam(EppSvcsubParam param)
Adds a service parameter to be associated with the subscription

addParam

public void addParam(java.lang.String name,
                     java.lang.String value)
Adds a service parameter to be associated with the subscription, given a paramater name and its value

getContact

public java.util.Vector getContact()
Gets a list of contacts associated with the subscription

addContact

public void addContact(EppContactType contact)
Adds a contact for the subscription

addContact

public void addContact(java.lang.String id,
                       java.lang.String type)
Adds a contact for the subscription, given a contact id and its type

getPeriod

public EppPeriod getPeriod()
Gets registration period for the subscription

setPeriod

public void setPeriod(EppPeriod period)
Sets registration period for the subscription

getRegistrant

public java.lang.String getRegistrant()
Gets the contact id of the registrant which owns the subscription

setRegistrant

public void setRegistrant(java.lang.String registrant)
Sets the contact id of the registrant which owns the subscription

getParamValue

public java.util.Vector getParamValue(java.lang.String name)
Extracts a list of the parameter values associated with the service subscription object based on the parameter name.

getContactId

public java.util.Vector getContactId(java.lang.String type)
Extracts a list of the contact ids associated with the service subscription object based on the contact type

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc,
                                 java.lang.String tag)
Converts the EppSvcsub object into an XML element
Overrides:
toXML in class EppEntity
Parameters:
doc - the XML Document object
tag - the tag/element name for the EppSvcsub object
Returns:
an Element object

fromXML

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

toString

public java.lang.String toString()
Overrides:
toString in class EppEntity

delete

public static EppCommandDeleteSvcsub delete(java.lang.String name,
                                            java.lang.String xid)
Creates an EppCommandDeleteSvcsub object for deleting an EPP Svcsub object from the registry.
Parameters:
name - the name of the svcsub object to be deleted
xid - the client transaction id associated with the operation

info

public static EppCommandInfoSvcsub info(java.lang.String name,
                                        java.lang.String xid)
Creates an EppCommandInfoSvcsub object for querying the details of an EPP Svcsub object
Parameters:
name - the name of the svcsub object to be queried
xid - the client transaction id associated with the operation

check

public static EppCommandCheckSvcsub check(java.lang.String xid)
Creates an EppCommandCheckSvcsub object for checking the existance of EPP Svcsub objects in the registry. Names of EPP Svcsub objects can be added via the add or addName methods.
Parameters:
xid - the client transaction id associated with the operation

transfer

public static EppCommandTransferSvcsub transfer(java.lang.String name,
                                                EppPeriod period,
                                                java.lang.String xid)
Creates an EppCommandTransferSvcsub object for transfering an EPP Svcsub object in the registry. The operation type, registration period and authorization information associated with the operation should be specified via setPeriod, setOperation and setAuthInfo method.
Parameters:
name - the name of the svcsub object to be transferred
period - the extended registration period of the svcsub object, or null if there is no change in the expiration timestamp of the svcsub object after the transfer operation
xid - the client transaction id associated with the operation

update

public static EppCommandUpdateSvcsub update(java.lang.String name,
                                            java.lang.String xid)
Creates an EppCommandUpdateSvcsub object for updating an EPP Svcsub object in the registry. The actual update information should be specified via the various methods defined for the EppCommandUpdateSvcsub object.
Parameters:
name - the name of the svcsub object to be updated
xid - the client transaction id associated with the operation

renew

public static EppCommandRenewSvcsub renew(java.lang.String name,
                                          java.util.Calendar curExpDate,
                                          EppPeriod period,
                                          java.lang.String xid)
Creates an EppCommandRenewSvcsub object for renewing the registration of an EPP Svcsub object in the registry.
Parameters:
name - the name of the svcsub object to be renewed
curExpDate - the current expiration date of the svcsub object
period - the new registration period of the svcsub object, or null if using the value specified by the registry
xid - the client transaction id associated with the operation

EPP 0.2.5

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