public class EPPOrg
extends java.lang.Object
EPPOrg
is the primary client interface class used for the Org
EPP mapping. An instance of EPPOrg
is created with an
initialized EPPSession
, and can be used for more than one
request within a single thread. A set of setter methods are provided to set
the attributes before a call to one of the send action methods. The responses
returned from the send action methods are either instances of
EPPResponse
or instances of response classes in the
com.verisign.epp.codec.org
package.EPPOrgCheckResp
,
EPPOrgInfoResp
,
EPPOrgCreateResp
Constructor and Description |
---|
EPPOrg(EPPSession aSession)
Constructs an
EPPOrg given an initialized EPP session. |
Modifier and Type | Method and Description |
---|---|
void |
addAddContact(EPPOrgContact aContact)
Adds an add contact to the list of add contacts.
|
void |
addAddRole(EPPOrgRole aRole)
Adds an add role to the list of add roles.
|
void |
addAddStatus(EPPOrgStatus aStatus)
Adds an add status to the list of add statuses.
|
void |
addContact(EPPOrgContact aContact)
Adds a contact to the list of contacts.
|
void |
addExtension(EPPCodecComponent aExtension)
Adds a command extension object.
|
void |
addOrgId(java.lang.String aOrgId)
Adds a org identifier for use with a
send method. |
void |
addPostalInfo(EPPOrgPostalDefinition aPostalInfo)
Adds a postal definition to the postal information for the org.
|
void |
addRemContact(EPPOrgContact aContact)
Adds a remove contact to the list of remove contacts.
|
void |
addRemRole(EPPOrgRole aRole)
Adds a remove role to the list of remove roles.
|
void |
addRemStatus(EPPOrgStatus aStatus)
Adds a remove status to the list of remove statuses.
|
void |
addRole(EPPOrgRole aRole)
Adds a role to the list of roles.
|
void |
addStatus(EPPOrgStatus aStatus)
Adds a status to the list of statuses.
|
java.util.List<EPPOrgContact> |
getAddContacts()
Gets the add contacts.
|
java.util.List<EPPOrgRole> |
getAddRoles()
Gets the add roles.
|
java.util.List<EPPOrgStatus> |
getAddStatuses()
Gets the add statuses.
|
java.util.List<EPPOrgContact> |
getContacts() |
java.lang.String |
getEmail() |
java.util.Vector |
getExtensions()
Gets the command extensions.
|
java.lang.String |
getFax() |
java.lang.String |
getFaxExt() |
java.util.List<java.lang.String> |
getOrgIds()
Get the list of org identifiers.
|
java.lang.String |
getParentId() |
java.util.List<EPPOrgPostalDefinition> |
getPostalInfo()
Gets the postal information for the org.
|
java.util.List<EPPOrgContact> |
getRemContacts()
Gets the remove contacts.
|
java.util.List<EPPOrgRole> |
getRemRoles()
Gets the remove roles.
|
java.util.List<EPPOrgStatus> |
getRemStatuses()
Gets the remove statuses.
|
EPPResponse |
getResponse()
Gets the response associated with the last command.
|
java.util.List<EPPOrgRole> |
getRoles()
Gets the list of roles
|
java.util.List<EPPOrgStatus> |
getStatuses()
Gets the list of statuses
|
java.lang.String |
getUrl()
Gets the URL of the website of the org.
|
java.lang.String |
getVoice() |
java.lang.String |
getVoiceExt() |
boolean |
hasAddRoles()
Is there any add roles set?
|
boolean |
hasAddStatuses()
Is there any add statuses set?
|
boolean |
hasContacts()
Is there any contacts set?
|
boolean |
hasPostalInfo()
Is there any postal information set?
|
boolean |
hasRemContacts()
Is there any remove contacts set?
|
boolean |
hasRemRoles()
Is there any remove roles set?
|
boolean |
hasRemStatuses()
Is there any remove statuses set?
|
protected void |
resetOrg()
Resets the Org instance to its initial state.
|
EPPOrgCheckResp |
sendCheck()
Sends a Org Check Command to the server.
There required attributes that must be set prior to executing sendCheck() include:addOrgId(String) - Sets the org identifiers to check. |
EPPOrgCreateResp |
sendCreate()
Sends a Org Create Command to the server.
There required attributes that must be set prior to executing sendCheck() include:addOrgId(String) - Sets the required org identifier to
create.
setRoles(List) - Sets the list of org roles.
The optional attributes can be set with the following: setTransId(String) - Sets the client transaction identifier. |
EPPResponse |
sendDelete()
Sends a Org Delete Command to the server.
There required attributes that must be set prior to executing sendInfo() include:addOrgId(String) - Sets the org identifier to get deleted. |
EPPOrgInfoResp |
sendInfo()
Sends a Org Info Command to the server.
There required attributes that must be set prior to executing sendInfo() include:addOrgId(String) - Sets the org identifier to get the
information for. |
EPPResponse |
sendUpdate()
Sends a Org Update Command to the server.
There required attributes that must be set prior to executing sendCheck() include:addOrgId(String) - Sets the org identifier to create.
The optional attributes can be set with the following: setTransId(String) - Sets the client transaction identifier. |
void |
setAddContacts(java.util.List<EPPOrgContact> aContacts)
Sets the add contacts.
|
void |
setAddRoles(java.util.List<EPPOrgRole> aRoles)
Sets the add roles.
|
void |
setAddStatuses(java.util.List<EPPOrgStatus> aStatuses)
Sets the add statuses.
|
void |
setContacts(java.util.List<EPPOrgContact> aContacts) |
void |
setEmail(java.lang.String aEmail) |
void |
setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.
|
void |
setFax(java.lang.String aFax) |
void |
setFaxExt(java.lang.String aFaxExt) |
void |
setParentId(java.lang.String aParentId) |
void |
setPostalInfo(java.util.List<EPPOrgPostalDefinition> aPostalInfo)
Sets the postal information for the org.
|
void |
setRemContacts(java.util.List<EPPOrgContact> aContacts)
Sets the remove contacts.
|
void |
setRemRoles(java.util.List<EPPOrgRole> aRoles)
Sets the remove roles.
|
void |
setRemStatuses(java.util.List<EPPOrgStatus> aStatuses)
Sets the remove statuses.
|
void |
setRoles(java.util.List<EPPOrgRole> aRoles)
Sets the list of roles
|
void |
setStatuses(java.util.List<EPPOrgStatus> aStatus)
Sets the list of statuses
|
void |
setTransId(java.lang.String aTransId)
Sets the client transaction identifier.
|
void |
setUrl(java.lang.String aUrl)
Sets the URL of the website of the org.
|
void |
setVoice(java.lang.String aVoice) |
void |
setVoiceExt(java.lang.String aVoiceExt) |
public EPPOrg(EPPSession aSession)
EPPOrg
given an initialized EPP session.aSession
- Server session to use.public void addExtension(EPPCodecComponent aExtension)
aExtension
- command extension object associated with the commandpublic void setExtensions(java.util.Vector aExtensions)
aExtensions
- command extension objects associated with the commandpublic java.util.Vector getExtensions()
Vector
of concrete EPPCodecComponent
associated with the command if exists; null
otherwise.public void setTransId(java.lang.String aTransId)
aTransId
- Client transaction identifierpublic java.util.List<java.lang.String> getOrgIds()
List
of org identifier String
'spublic void addOrgId(java.lang.String aOrgId)
send
method. Adding more
than one org identifier is only supported by sendCheck()
.aOrgId
- Org Identifierpublic java.lang.String getParentId()
public void setParentId(java.lang.String aParentId)
aParentId
- the parentId to setpublic boolean hasPostalInfo()
true
if there is at least one
EPPOrgPostalDefinition
set in the postal information;
false
otherwise.public void addPostalInfo(EPPOrgPostalDefinition aPostalInfo)
aPostalInfo
- Postal definition to add to the postal information.public java.util.List<EPPOrgPostalDefinition> getPostalInfo()
EPPOrgPostalDefinition
objects in the postal information list.public void setPostalInfo(java.util.List<EPPOrgPostalDefinition> aPostalInfo)
EPPOrgPostalDefinition
objects in the postal information list.aPostalInfo
- Postal information for the org.public java.lang.String getVoice()
public void setVoice(java.lang.String aVoice)
aVoice
- the voice to setpublic java.lang.String getVoiceExt()
public void setVoiceExt(java.lang.String aVoiceExt)
aVoiceExt
- the voiceExt to setpublic java.lang.String getFax()
public void setFax(java.lang.String aFax)
aFax
- the fax to setpublic java.lang.String getFaxExt()
public void setFaxExt(java.lang.String aFaxExt)
aFaxExt
- the faxExt to setpublic java.lang.String getEmail()
public void setEmail(java.lang.String aEmail)
aEmail
- the email to setpublic java.lang.String getUrl()
public void setUrl(java.lang.String aUrl)
aUrl
- URL of the website of the org.public boolean hasContacts()
true
if there is at least one EPPOrgContact
set; false
otherwise.public void addContact(EPPOrgContact aContact)
aContact
- Contact add to the list of contacts.public java.util.List<EPPOrgContact> getContacts()
public void setContacts(java.util.List<EPPOrgContact> aContacts)
aContacts
- the contacts to setpublic void addAddContact(EPPOrgContact aContact)
aContact
- Contact to add to the list of add contacts.public java.util.List<EPPOrgContact> getAddContacts()
public void setAddContacts(java.util.List<EPPOrgContact> aContacts)
aContacts
- List of add contactspublic boolean hasRemContacts()
true
if there is at least one remove
EPPOrgContact
set; false
otherwise.public void addRemContact(EPPOrgContact aContact)
aContact
- Contact to add to the list of remove contacts.public java.util.List<EPPOrgContact> getRemContacts()
public void setRemContacts(java.util.List<EPPOrgContact> aContacts)
aContacts
- List of remove contactspublic void addRole(EPPOrgRole aRole)
aRole
- Role to add to the list of roles.public java.util.List<EPPOrgRole> getRoles()
public void setRoles(java.util.List<EPPOrgRole> aRoles)
aRoles
- the roles to setpublic boolean hasAddRoles()
true
if there is at least one add EPPOrgRole
set; false
otherwise.public void addAddRole(EPPOrgRole aRole)
aRole
- Role to add to the list of add roles.public java.util.List<EPPOrgRole> getAddRoles()
public void setAddRoles(java.util.List<EPPOrgRole> aRoles)
aRoles
- List of add rolespublic boolean hasRemRoles()
true
if there is at least one remove
EPPOrgRole
set; false
otherwise.public void addRemRole(EPPOrgRole aRole)
aRole
- Role to add to the list of remove roles.public java.util.List<EPPOrgRole> getRemRoles()
public void setRemRoles(java.util.List<EPPOrgRole> aRoles)
aRoles
- List of remove rolespublic void addStatus(EPPOrgStatus aStatus)
aStatus
- Status to add to the list of statuses.public java.util.List<EPPOrgStatus> getStatuses()
public void setStatuses(java.util.List<EPPOrgStatus> aStatus)
aStatus
- the statuses to setpublic boolean hasAddStatuses()
true
if there is at least one add
EPPOrgStatus
set; false
otherwise.public void addAddStatus(EPPOrgStatus aStatus)
aStatus
- Status to add to the list of add statuses.public java.util.List<EPPOrgStatus> getAddStatuses()
public void setAddStatuses(java.util.List<EPPOrgStatus> aStatuses)
aStatuses
- List of add statusespublic boolean hasRemStatuses()
true
if there is at least one remove
EPPOrgStatus
set; false
otherwise.public void addRemStatus(EPPOrgStatus aStatus)
aStatus
- Status to add to the list of remove statuses.public java.util.List<EPPOrgStatus> getRemStatuses()
public void setRemStatuses(java.util.List<EPPOrgStatus> aStatuses)
aStatuses
- List of remove statusespublic EPPOrgCheckResp sendCheck() throws EPPCommandException
sendCheck()
include:addOrgId(String)
- Sets the org identifiers to check. At
least one org identifier must be set.setTransId(String)
- Sets the client transaction identifier.
EPPOrgCheckResp
with the check results.EPPCommandException
- On errorpublic EPPOrgInfoResp sendInfo() throws EPPCommandException
sendInfo()
include:addOrgId(String)
- Sets the org identifier to get the
information for. Only one org identifier is valid.setTransId(String)
- Sets the client transaction identifier.
EPPOrgInfoResp
that contains the org information.EPPCommandException
- On errorpublic EPPOrgCreateResp sendCreate() throws EPPCommandException
sendCheck()
include:addOrgId(String)
- Sets the required org identifier to
create.setRoles(List)
- Sets the list of org roles.setTransId(String)
- Sets the client transaction identifier.
setContacts(List)
- Sets the org contacts.addStatus(EPPOrgStatus)
- Adds a status of the org. This is
optional since the server will default to "ok".setParentId(String)
- Sets the parent org identifier of the
org.addPostalInfo(EPPOrgPostalDefinition)
- Sets the postal
information of the org.setEmail(String)
- Sets the org email.setVoice(String)
- Sets the org voice number.setVoiceExt(String)
- Sets the org voice number extension.
setFax(String)
- Sets the org fax number.setFaxExt(String)
- Sets the org fax number extension.setUrl(String)
- Sets the org URL.EPPOrgCreateResp
with the create result.EPPCommandException
- On errorpublic EPPResponse sendDelete() throws EPPCommandException
sendInfo()
include:addOrgId(String)
- Sets the org identifier to get deleted.
Only one org identifier is valid.setTransId(String)
- Sets the client transaction identifier.
EPPResponse
that contains the deletion result.EPPCommandException
- On errorpublic EPPResponse sendUpdate() throws EPPCommandException
sendCheck()
include:addOrgId(String)
- Sets the org identifier to create.setTransId(String)
- Sets the client transaction identifier.
setParentId(String)
- Sets the parent org identifier of the
org.addPostalInfo(EPPOrgPostalDefinition)
- Sets the postal
information of the org.setVoice(String)
- Sets the org voice number.setVoiceExt(String)
- Sets the org voice number extension.
setFax(String)
- Sets the org fax number.setFaxExt(String)
- Sets the org fax number extension.setEmail(String)
- Sets the org email.setUrl(String)
- Sets the org URL.setAddContacts(List)
- Sets the org contacts to add.setRemContacts(List)
- Sets the org contacts to remove.setAddRoles(List)
- Sets the org roles to add.setRemRoles(List)
- Sets the org roles to remove.setAddStatuses(List)
- Sets the org statuses to add.setRemStatuses(List)
- Sets the org statuses to remove.EPPResponse
with the update result.EPPCommandException
- On errorprotected void resetOrg()
public EPPResponse getResponse()