Package com.verisign.epp.interfaces
Class EPPOrg
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPOrg
-
public class EPPOrg extends java.lang.ObjectEPPOrgis the primary client interface class used for the Org EPP mapping. An instance ofEPPOrgis created with an initializedEPPSession, 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 ofEPPResponseor instances of response classes in thecom.verisign.epp.codec.orgpackage.- See Also:
EPPOrgCheckResp,EPPOrgInfoResp,EPPOrgCreateResp
-
-
Constructor Summary
Constructors Constructor Description EPPOrg(EPPSession aSession)Constructs anEPPOrggiven an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAddContact(EPPOrgContact aContact)Adds an add contact to the list of add contacts.voidaddAddRole(EPPOrgRole aRole)Adds an add role to the list of add roles.voidaddAddStatus(EPPOrgStatus aStatus)Adds an add status to the list of add statuses.voidaddContact(EPPOrgContact aContact)Adds a contact to the list of contacts.voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.voidaddOrgId(java.lang.String aOrgId)Adds a org identifier for use with asendmethod.voidaddPostalInfo(EPPOrgPostalDefinition aPostalInfo)Adds a postal definition to the postal information for the org.voidaddRemContact(EPPOrgContact aContact)Adds a remove contact to the list of remove contacts.voidaddRemRole(EPPOrgRole aRole)Adds a remove role to the list of remove roles.voidaddRemStatus(EPPOrgStatus aStatus)Adds a remove status to the list of remove statuses.voidaddRole(EPPOrgRole aRole)Adds a role to the list of roles.voidaddStatus(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.StringgetEmail()java.util.VectorgetExtensions()Gets the command extensions.java.lang.StringgetFax()java.lang.StringgetFaxExt()java.util.List<java.lang.String>getOrgIds()Get the list of org identifiers.java.lang.StringgetParentId()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.EPPResponsegetResponse()Gets the response associated with the last command.java.util.List<EPPOrgRole>getRoles()Gets the list of rolesjava.util.List<EPPOrgStatus>getStatuses()Gets the list of statusesjava.lang.StringgetUrl()Gets the URL of the website of the org.java.lang.StringgetVoice()java.lang.StringgetVoiceExt()booleanhasAddRoles()Is there any add roles set?booleanhasAddStatuses()Is there any add statuses set?booleanhasContacts()Is there any contacts set?booleanhasPostalInfo()Is there any postal information set?booleanhasRemContacts()Is there any remove contacts set?booleanhasRemRoles()Is there any remove roles set?booleanhasRemStatuses()Is there any remove statuses set?protected voidresetOrg()Resets the Org instance to its initial state.EPPOrgCheckRespsendCheck()Sends a Org Check Command to the server.
There required attributes that must be set prior to executingsendCheck()include:
addOrgId(String)- Sets the org identifiers to check.EPPOrgCreateRespsendCreate()Sends a Org Create Command to the server.
There required attributes that must be set prior to executingsendCheck()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.EPPResponsesendDelete()Sends a Org Delete Command to the server.
There required attributes that must be set prior to executingsendInfo()include:
addOrgId(String)- Sets the org identifier to get deleted.EPPOrgInfoRespsendInfo()Sends a Org Info Command to the server.
There required attributes that must be set prior to executingsendInfo()include:
addOrgId(String)- Sets the org identifier to get the information for.EPPResponsesendUpdate()Sends a Org Update Command to the server.
There required attributes that must be set prior to executingsendCheck()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.voidsetAddContacts(java.util.List<EPPOrgContact> aContacts)Sets the add contacts.voidsetAddRoles(java.util.List<EPPOrgRole> aRoles)Sets the add roles.voidsetAddStatuses(java.util.List<EPPOrgStatus> aStatuses)Sets the add statuses.voidsetContacts(java.util.List<EPPOrgContact> aContacts)voidsetEmail(java.lang.String aEmail)voidsetExtensions(java.util.Vector aExtensions)Sets the command extension objects.voidsetFax(java.lang.String aFax)voidsetFaxExt(java.lang.String aFaxExt)voidsetParentId(java.lang.String aParentId)voidsetPostalInfo(java.util.List<EPPOrgPostalDefinition> aPostalInfo)Sets the postal information for the org.voidsetRemContacts(java.util.List<EPPOrgContact> aContacts)Sets the remove contacts.voidsetRemRoles(java.util.List<EPPOrgRole> aRoles)Sets the remove roles.voidsetRemStatuses(java.util.List<EPPOrgStatus> aStatuses)Sets the remove statuses.voidsetRoles(java.util.List<EPPOrgRole> aRoles)Sets the list of rolesvoidsetStatuses(java.util.List<EPPOrgStatus> aStatus)Sets the list of statusesvoidsetTransId(java.lang.String aTransId)Sets the client transaction identifier.voidsetUrl(java.lang.String aUrl)Sets the URL of the website of the org.voidsetVoice(java.lang.String aVoice)voidsetVoiceExt(java.lang.String aVoiceExt)
-
-
-
Constructor Detail
-
EPPOrg
public EPPOrg(EPPSession aSession)
Constructs anEPPOrggiven an initialized EPP session.- Parameters:
aSession- Server session to use.
-
-
Method Detail
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtensions
public void setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.- Parameters:
aExtensions- command extension objects associated with the command
-
getExtensions
public java.util.Vector getExtensions()
Gets the command extensions.- Returns:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
setTransId
public void setTransId(java.lang.String aTransId)
Sets the client transaction identifier.- Parameters:
aTransId- Client transaction identifier
-
getOrgIds
public java.util.List<java.lang.String> getOrgIds()
Get the list of org identifiers.- Returns:
Listof org identifierString's
-
addOrgId
public void addOrgId(java.lang.String aOrgId)
Adds a org identifier for use with asendmethod. Adding more than one org identifier is only supported bysendCheck().- Parameters:
aOrgId- Org Identifier
-
getParentId
public java.lang.String getParentId()
- Returns:
- the parentId
-
setParentId
public void setParentId(java.lang.String aParentId)
- Parameters:
aParentId- the parentId to set
-
hasPostalInfo
public boolean hasPostalInfo()
Is there any postal information set?- Returns:
trueif there is at least oneEPPOrgPostalDefinitionset in the postal information;falseotherwise.
-
addPostalInfo
public void addPostalInfo(EPPOrgPostalDefinition aPostalInfo)
Adds a postal definition to the postal information for the org.- Parameters:
aPostalInfo- Postal definition to add to the postal information.
-
getPostalInfo
public java.util.List<EPPOrgPostalDefinition> getPostalInfo()
Gets the postal information for the org. There can be one or twoEPPOrgPostalDefinitionobjects in the postal information list.- Returns:
- Postal information for the org
-
setPostalInfo
public void setPostalInfo(java.util.List<EPPOrgPostalDefinition> aPostalInfo)
Sets the postal information for the org. There can be one or twoEPPOrgPostalDefinitionobjects in the postal information list.- Parameters:
aPostalInfo- Postal information for the org.
-
getVoice
public java.lang.String getVoice()
- Returns:
- the voice
-
setVoice
public void setVoice(java.lang.String aVoice)
- Parameters:
aVoice- the voice to set
-
getVoiceExt
public java.lang.String getVoiceExt()
- Returns:
- the voiceExt
-
setVoiceExt
public void setVoiceExt(java.lang.String aVoiceExt)
- Parameters:
aVoiceExt- the voiceExt to set
-
getFax
public java.lang.String getFax()
- Returns:
- the fax
-
setFax
public void setFax(java.lang.String aFax)
- Parameters:
aFax- the fax to set
-
getFaxExt
public java.lang.String getFaxExt()
- Returns:
- the faxExt
-
setFaxExt
public void setFaxExt(java.lang.String aFaxExt)
- Parameters:
aFaxExt- the faxExt to set
-
getEmail
public java.lang.String getEmail()
- Returns:
- the email
-
setEmail
public void setEmail(java.lang.String aEmail)
- Parameters:
aEmail- the email to set
-
getUrl
public java.lang.String getUrl()
Gets the URL of the website of the org.- Returns:
- URL of the website of the org.
-
setUrl
public void setUrl(java.lang.String aUrl)
Sets the URL of the website of the org.- Parameters:
aUrl- URL of the website of the org.
-
hasContacts
public boolean hasContacts()
Is there any contacts set?- Returns:
trueif there is at least oneEPPOrgContactset;falseotherwise.
-
addContact
public void addContact(EPPOrgContact aContact)
Adds a contact to the list of contacts.- Parameters:
aContact- Contact add to the list of contacts.
-
getContacts
public java.util.List<EPPOrgContact> getContacts()
- Returns:
- the contacts
-
setContacts
public void setContacts(java.util.List<EPPOrgContact> aContacts)
- Parameters:
aContacts- the contacts to set
-
addAddContact
public void addAddContact(EPPOrgContact aContact)
Adds an add contact to the list of add contacts.- Parameters:
aContact- Contact to add to the list of add contacts.
-
getAddContacts
public java.util.List<EPPOrgContact> getAddContacts()
Gets the add contacts.- Returns:
- List of add contacts set.
-
setAddContacts
public void setAddContacts(java.util.List<EPPOrgContact> aContacts)
Sets the add contacts.- Parameters:
aContacts- List of add contacts
-
hasRemContacts
public boolean hasRemContacts()
Is there any remove contacts set?- Returns:
trueif there is at least one removeEPPOrgContactset;falseotherwise.
-
addRemContact
public void addRemContact(EPPOrgContact aContact)
Adds a remove contact to the list of remove contacts.- Parameters:
aContact- Contact to add to the list of remove contacts.
-
getRemContacts
public java.util.List<EPPOrgContact> getRemContacts()
Gets the remove contacts.- Returns:
- List of remove contacts set.
-
setRemContacts
public void setRemContacts(java.util.List<EPPOrgContact> aContacts)
Sets the remove contacts.- Parameters:
aContacts- List of remove contacts
-
addRole
public void addRole(EPPOrgRole aRole)
Adds a role to the list of roles.- Parameters:
aRole- Role to add to the list of roles.
-
getRoles
public java.util.List<EPPOrgRole> getRoles()
Gets the list of roles- Returns:
- the roles
-
setRoles
public void setRoles(java.util.List<EPPOrgRole> aRoles)
Sets the list of roles- Parameters:
aRoles- the roles to set
-
hasAddRoles
public boolean hasAddRoles()
Is there any add roles set?- Returns:
trueif there is at least one addEPPOrgRoleset;falseotherwise.
-
addAddRole
public void addAddRole(EPPOrgRole aRole)
Adds an add role to the list of add roles.- Parameters:
aRole- Role to add to the list of add roles.
-
getAddRoles
public java.util.List<EPPOrgRole> getAddRoles()
Gets the add roles.- Returns:
- List of add roles set.
-
setAddRoles
public void setAddRoles(java.util.List<EPPOrgRole> aRoles)
Sets the add roles.- Parameters:
aRoles- List of add roles
-
hasRemRoles
public boolean hasRemRoles()
Is there any remove roles set?- Returns:
trueif there is at least one removeEPPOrgRoleset;falseotherwise.
-
addRemRole
public void addRemRole(EPPOrgRole aRole)
Adds a remove role to the list of remove roles.- Parameters:
aRole- Role to add to the list of remove roles.
-
getRemRoles
public java.util.List<EPPOrgRole> getRemRoles()
Gets the remove roles.- Returns:
- List of remove roles set.
-
setRemRoles
public void setRemRoles(java.util.List<EPPOrgRole> aRoles)
Sets the remove roles.- Parameters:
aRoles- List of remove roles
-
addStatus
public void addStatus(EPPOrgStatus aStatus)
Adds a status to the list of statuses.- Parameters:
aStatus- Status to add to the list of statuses.
-
getStatuses
public java.util.List<EPPOrgStatus> getStatuses()
Gets the list of statuses- Returns:
- the statuses
-
setStatuses
public void setStatuses(java.util.List<EPPOrgStatus> aStatus)
Sets the list of statuses- Parameters:
aStatus- the statuses to set
-
hasAddStatuses
public boolean hasAddStatuses()
Is there any add statuses set?- Returns:
trueif there is at least one addEPPOrgStatusset;falseotherwise.
-
addAddStatus
public void addAddStatus(EPPOrgStatus aStatus)
Adds an add status to the list of add statuses.- Parameters:
aStatus- Status to add to the list of add statuses.
-
getAddStatuses
public java.util.List<EPPOrgStatus> getAddStatuses()
Gets the add statuses.- Returns:
- List of add statuses set.
-
setAddStatuses
public void setAddStatuses(java.util.List<EPPOrgStatus> aStatuses)
Sets the add statuses.- Parameters:
aStatuses- List of add statuses
-
hasRemStatuses
public boolean hasRemStatuses()
Is there any remove statuses set?- Returns:
trueif there is at least one removeEPPOrgStatusset;falseotherwise.
-
addRemStatus
public void addRemStatus(EPPOrgStatus aStatus)
Adds a remove status to the list of remove statuses.- Parameters:
aStatus- Status to add to the list of remove statuses.
-
getRemStatuses
public java.util.List<EPPOrgStatus> getRemStatuses()
Gets the remove statuses.- Returns:
- List of remove statuses set.
-
setRemStatuses
public void setRemStatuses(java.util.List<EPPOrgStatus> aStatuses)
Sets the remove statuses.- Parameters:
aStatuses- List of remove statuses
-
sendCheck
public EPPOrgCheckResp sendCheck() throws EPPCommandException
Sends a Org Check Command to the server.
There required attributes that must be set prior to executingsendCheck()include:
addOrgId(String)- Sets the org identifiers to check. At least one org identifier must be set.
The optional attributes can be set with the following:
setTransId(String)- Sets the client transaction identifier.
- Returns:
EPPOrgCheckRespwith the check results.- Throws:
EPPCommandException- On error
-
sendInfo
public EPPOrgInfoResp sendInfo() throws EPPCommandException
Sends a Org Info Command to the server.
There required attributes that must be set prior to executingsendInfo()include:
addOrgId(String)- Sets the org identifier to get the information for. Only one org identifier is valid.
The optional attributes can be set with the following:
setTransId(String)- Sets the client transaction identifier.
- Returns:
EPPOrgInfoRespthat contains the org information.- Throws:
EPPCommandException- On error
-
sendCreate
public EPPOrgCreateResp sendCreate() throws EPPCommandException
Sends a Org Create Command to the server.
There required attributes that must be set prior to executingsendCheck()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.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.
- Returns:
EPPOrgCreateRespwith the create result.- Throws:
EPPCommandException- On error
-
sendDelete
public EPPResponse sendDelete() throws EPPCommandException
Sends a Org Delete Command to the server.
There required attributes that must be set prior to executingsendInfo()include:
addOrgId(String)- Sets the org identifier to get deleted. Only one org identifier is valid.
The optional attributes can be set with the following:
setTransId(String)- Sets the client transaction identifier.
- Returns:
EPPResponsethat contains the deletion result.- Throws:
EPPCommandException- On error
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
Sends a Org Update Command to the server.
There required attributes that must be set prior to executingsendCheck()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.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.
- Returns:
EPPResponsewith the update result.- Throws:
EPPCommandException- On error
-
resetOrg
protected void resetOrg()
Resets the Org instance to its initial state.
-
getResponse
public EPPResponse getResponse()
Gets the response associated with the last command. This method can be used to retrieve the server error response in the catch block of EPPCommandException.- Returns:
- Response associated with the last command
-
-