Class EPPOrg

java.lang.Object
com.verisign.epp.interfaces.EPPOrg

public class EPPOrg extends 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.
See Also:
  • Constructor Details

    • EPPOrg

      public EPPOrg(EPPSession aSession)
      Constructs an EPPOrg given an initialized EPP session.
      Parameters:
      aSession - Server session to use.
  • Method Details

    • addExtension

      public void addExtension(EPPCodecComponent aExtension)
      Adds a command extension object.
      Parameters:
      aExtension - command extension object associated with the command
    • setExtensions

      public void setExtensions(Vector aExtensions)
      Sets the command extension objects.
      Parameters:
      aExtensions - command extension objects associated with the command
    • getExtensions

      public Vector getExtensions()
      Gets the command extensions.
      Returns:
      Vector of concrete EPPCodecComponent associated with the command if exists; null otherwise.
    • setTransId

      public void setTransId(String aTransId)
      Sets the client transaction identifier.
      Parameters:
      aTransId - Client transaction identifier
    • getOrgIds

      public List<String> getOrgIds()
      Get the list of org identifiers.
      Returns:
      List of org identifier String's
    • addOrgId

      public void addOrgId(String aOrgId)
      Adds a org identifier for use with a send method. Adding more than one org identifier is only supported by sendCheck().
      Parameters:
      aOrgId - Org Identifier
    • getParentId

      public String getParentId()
      Returns:
      the parentId
    • setParentId

      public void setParentId(String aParentId)
      Parameters:
      aParentId - the parentId to set
    • hasPostalInfo

      public boolean hasPostalInfo()
      Is there any postal information set?
      Returns:
      true if there is at least one EPPOrgPostalDefinition set in the postal information; false otherwise.
    • 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 List<EPPOrgPostalDefinition> getPostalInfo()
      Gets the postal information for the org. There can be one or two EPPOrgPostalDefinition objects in the postal information list.
      Returns:
      Postal information for the org
    • setPostalInfo

      public void setPostalInfo(List<EPPOrgPostalDefinition> aPostalInfo)
      Sets the postal information for the org. There can be one or two EPPOrgPostalDefinition objects in the postal information list.
      Parameters:
      aPostalInfo - Postal information for the org.
    • getVoice

      public String getVoice()
      Returns:
      the voice
    • setVoice

      public void setVoice(String aVoice)
      Parameters:
      aVoice - the voice to set
    • getVoiceExt

      public String getVoiceExt()
      Returns:
      the voiceExt
    • setVoiceExt

      public void setVoiceExt(String aVoiceExt)
      Parameters:
      aVoiceExt - the voiceExt to set
    • getFax

      public String getFax()
      Returns:
      the fax
    • setFax

      public void setFax(String aFax)
      Parameters:
      aFax - the fax to set
    • getFaxExt

      public String getFaxExt()
      Returns:
      the faxExt
    • setFaxExt

      public void setFaxExt(String aFaxExt)
      Parameters:
      aFaxExt - the faxExt to set
    • getEmail

      public String getEmail()
      Returns:
      the email
    • setEmail

      public void setEmail(String aEmail)
      Parameters:
      aEmail - the email to set
    • getUrl

      public String getUrl()
      Gets the URL of the website of the org.
      Returns:
      URL of the website of the org.
    • setUrl

      public void setUrl(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:
      true if there is at least one EPPOrgContact set; false otherwise.
    • 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 List<EPPOrgContact> getContacts()
      Returns:
      the contacts
    • setContacts

      public void setContacts(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 List<EPPOrgContact> getAddContacts()
      Gets the add contacts.
      Returns:
      List of add contacts set.
    • setAddContacts

      public void setAddContacts(List<EPPOrgContact> aContacts)
      Sets the add contacts.
      Parameters:
      aContacts - List of add contacts
    • hasRemContacts

      public boolean hasRemContacts()
      Is there any remove contacts set?
      Returns:
      true if there is at least one remove EPPOrgContact set; false otherwise.
    • 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 List<EPPOrgContact> getRemContacts()
      Gets the remove contacts.
      Returns:
      List of remove contacts set.
    • setRemContacts

      public void setRemContacts(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 List<EPPOrgRole> getRoles()
      Gets the list of roles
      Returns:
      the roles
    • setRoles

      public void setRoles(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:
      true if there is at least one add EPPOrgRole set; false otherwise.
    • 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 List<EPPOrgRole> getAddRoles()
      Gets the add roles.
      Returns:
      List of add roles set.
    • setAddRoles

      public void setAddRoles(List<EPPOrgRole> aRoles)
      Sets the add roles.
      Parameters:
      aRoles - List of add roles
    • hasRemRoles

      public boolean hasRemRoles()
      Is there any remove roles set?
      Returns:
      true if there is at least one remove EPPOrgRole set; false otherwise.
    • 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 List<EPPOrgRole> getRemRoles()
      Gets the remove roles.
      Returns:
      List of remove roles set.
    • setRemRoles

      public void setRemRoles(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 List<EPPOrgStatus> getStatuses()
      Gets the list of statuses
      Returns:
      the statuses
    • setStatuses

      public void setStatuses(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:
      true if there is at least one add EPPOrgStatus set; false otherwise.
    • 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 List<EPPOrgStatus> getAddStatuses()
      Gets the add statuses.
      Returns:
      List of add statuses set.
    • setAddStatuses

      public void setAddStatuses(List<EPPOrgStatus> aStatuses)
      Sets the add statuses.
      Parameters:
      aStatuses - List of add statuses
    • hasRemStatuses

      public boolean hasRemStatuses()
      Is there any remove statuses set?
      Returns:
      true if there is at least one remove EPPOrgStatus set; false otherwise.
    • 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 List<EPPOrgStatus> getRemStatuses()
      Gets the remove statuses.
      Returns:
      List of remove statuses set.
    • setRemStatuses

      public void setRemStatuses(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 executing sendCheck() 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:

      Returns:
      EPPOrgCheckResp with 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 executing sendInfo() 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:

      Returns:
      EPPOrgInfoResp that 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 executing sendCheck() include:



      The optional attributes can be set with the following:

      Returns:
      EPPOrgCreateResp with 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 executing sendInfo() 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:

      Returns:
      EPPResponse that 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 executing sendCheck() include:



      The optional attributes can be set with the following:

      Returns:
      EPPResponse with 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