com.verisign.epp.interfaces

## Class EPPOrg

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

-     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.
  See Also:
    `EPPOrgCheckResp`, `EPPOrgInfoResp`, `EPPOrgCreateResp`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPOrg(EPPSession aSession)` Constructs an `EPPOrg` given an initialized EPP session.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.
    `EPPOrgCreateResp` | `sendCreate()` Sends a Org Create Command to the server.
    `EPPResponse` | `sendDelete()` Sends a Org Delete Command to the server.
    `EPPOrgInfoResp` | `sendInfo()` Sends a Org Info Command to the server.
    `EPPResponse` | `sendUpdate()` Sends a Org Update Command to the server.
    `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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EPPOrg

          public EPPOrg(EPPSession aSession)

      Constructs an `EPPOrg` given 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:
        `Vector` of concrete `EPPCodecComponent` associated with the command if exists; `null` otherwise.

    - #### 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:
        `List` of org identifier `String`'s

    - #### addOrgId

          public void addOrgId(java.lang.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 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:
        `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 java.util.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(java.util.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 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:
        `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 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:
        `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 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:
        `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 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:
        `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 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:
        `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 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:
        `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 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 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:
      - `setTransId(String)` - Sets the client transaction identifier.
      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:
      - `setTransId(String)` - Sets the client transaction identifier.
      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:
      - `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.
      preferences for the org.

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:
  - `setTransId(String)` - Sets the client transaction identifier.
  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:
  - `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.
  preferences for the org.

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

Copyright © VeriSign Inc. All Rights Reserved.