Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.knipp.rritoolkit
Class ContactData

    java.lang.Object
      de.knipp.rritoolkit.ContactData

All Implemented Interfaces:
  java.io.Serializable

    public class ContactData

extends java.lang.Object
implements java.io.Serializable

class that holds contact data, both for requests and responses

Version:
  $Revision: 14987 $
Author:
  Klaus Malorny
See Also:
  Serialized Form

Nested Class Summary
`static class` | `ContactData.Field` enumeration for the different disclose fields
`static class` | `ContactData.Type` enumeration for the different contact types

Field Summary
`private java.util.List<java.lang.String>` | `address` the address
`private java.util.Date` | `changed` the change date
`private java.lang.String` | `city` the city
`private java.lang.String` | `countryCode` the country code
`private java.util.Set<ContactData.Field>` | `disclose` the disclosed fields
`private boolean` | `disputeReference` flag whether contact is holder of a domain in dispute
`private java.util.List<java.lang.String>` | `emailAddresses` the e-mail addresses
`private java.util.List<java.lang.String>` | `faxNumbers` the fax numbers
`private java.lang.String` | `handle` the handle
`private java.lang.String` | `name` the name
`private java.util.List<java.lang.String>` | `organisation` the organisation
`private java.util.List<java.lang.String>` | `phoneNumbers` the phone numbers
`private java.lang.String` | `postalCode` the postal code
`private java.util.List<java.lang.String>` | `remarks` the remarks
`private java.util.List<java.lang.String>` | `sipAddresses` the sip addresses
`private ContactData.Type` | `type` the type

Constructor Summary
`ContactData()` constructor
`ContactData(ContactData other)` copy constructor

Method Summary
`private void` | `add(XmlBuilder xb, java.lang.String localName, java.util.List<java.lang.String> values, ContactData.Field field)` add elements for a list to the builder
`private void` | `add(XmlBuilder xb, java.lang.String localName, java.lang.String value, ContactData.Field field)` add an element to the builder
`void` | `fromList(KVList list)` parse the given key-value list.
`void` | `fromXml(org.w3c.dom.Element node)` parse the given XML subtree
`java.util.List<java.lang.String>` | `getAddress()` return the address as a list of strings
`java.lang.String[]` | `getAddressAsArray()` return the address as an array
`java.util.Date` | `getChangeDate()` return the change date
`java.lang.String` | `getCity()` return the city
`java.lang.String` | `getCountryCode()` return the country code
`java.util.Set<ContactData.Field>` | `getDisclosedFields()` return the disclosed fields
`boolean` | `getDisputeReference()` return whether the contact is referenced as a holder contact by a domain that is in the dispute state
`java.util.List<java.lang.String>` | `getEMailAddresses()` return the e-mail addresses as a list of strings
`java.lang.String[]` | `getEMailAddressesAsArray()` return the e-mail addresses as an array
`java.util.List<java.lang.String>` | `getFaxNumbers()` return the fax numbers as a list of strings
`java.lang.String[]` | `getFaxNumbersAsArray()` return the fax numbers as an array
`java.lang.String` | `getHandle()` return the handle
`java.lang.String` | `getName()` return the name
`java.util.List<java.lang.String>` | `getOrganisation()` return the organisation as a list of strings
`java.lang.String[]` | `getOrganisationAsArray()` return the organisation as an array
`java.util.List<java.lang.String>` | `getPhoneNumbers()` return the phone numbers as a list of strings
`java.lang.String[]` | `getPhoneNumbersAsArray()` return the phone numbers as an array
`java.lang.String` | `getPostalCode()` return the postal code
`java.util.List<java.lang.String>` | `getRemarks()` return the remarks as a list of strings
`java.lang.String[]` | `getRemarksAsArray()` return the remarks as an array
`java.util.List<java.lang.String>` | `getSipAddresses()` return the SIP addresses as a list of strings
`java.lang.String[]` | `getSipAddressesAsArray()` return the SIP addresses as an array
`ContactData.Type` | `getType()` return the contact type
`private boolean` | `isDisclosed(org.w3c.dom.Element el)` return whether the element has the disclose attribute set
`private java.lang.String` | `parseField(org.w3c.dom.Node node, java.lang.String localName, ContactData.Field field)` parse a single field
`private void` | `parseField(org.w3c.dom.Node node, java.lang.String localName, ContactData.Field field, java.util.List<java.lang.String> list)` parse a field consisting of multiple entries
`void` | `setAddress(java.util.List<java.lang.String> list)` set the address
`void` | `setAddress(java.lang.String... lines)` set the address
`void` | `setCity(java.lang.String theCity)` set the city
`void` | `setCountryCode(java.lang.String code)` set the country code
`void` | `setDisclosedFields(java.util.Collection<ContactData.Field> collection)` set the disclosed fields
`void` | `setEMailAddresses(java.util.List<java.lang.String> list)` set the e-mail addresses
`void` | `setEMailAddresses(java.lang.String... addrs)` set the e-mail addresses
`void` | `setFaxNumbers(java.util.List<java.lang.String> list)` set the fax numbers
`void` | `setFaxNumbers(java.lang.String... numbers)` set the fax numbers
`void` | `setHandle(java.lang.String theHandle)` set the handle
`void` | `setName(java.lang.String theName)` set the name
`void` | `setOrganisation(java.util.List<java.lang.String> list)` set the organisation
`void` | `setOrganisation(java.lang.String... lines)` set the organisation
`void` | `setPhoneNumbers(java.util.List<java.lang.String> list)` set the phone numbers
`void` | `setPhoneNumbers(java.lang.String... numbers)` set the phone numbers
`void` | `setPostalCode(java.lang.String code)` set the postal code
`void` | `setRemarks(java.util.List<java.lang.String> list)` set the remarks
`void` | `setRemarks(java.lang.String... lines)` set the remarks
`void` | `setSipAddresses(java.util.List<java.lang.String> list)` set the SIP addresses
`void` | `setSipAddresses(java.lang.String... addrs)` set the SIP addresses
`void` | `setType(ContactData.Type theType)` set the type
`void` | `toList(KVList list)` convert the object to a KV list as part of a contact request
`java.lang.String` | `toString()` convert the contact to a sting for debugging purposes
`void` | `toXml(org.w3c.dom.Node node)` convert the object to XML as part of a contact request

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### handle

    private java.lang.String handle

  the handle

### type

    private ContactData.Type type

  the type

### name

    private java.lang.String name

  the name

### organisation

    private java.util.List<java.lang.String> organisation

  the organisation

### address

    private java.util.List<java.lang.String> address

  the address

### postalCode

    private java.lang.String postalCode

  the postal code

### city

    private java.lang.String city

  the city

### countryCode

    private java.lang.String countryCode

  the country code

### phoneNumbers

    private java.util.List<java.lang.String> phoneNumbers

  the phone numbers

### faxNumbers

    private java.util.List<java.lang.String> faxNumbers

  the fax numbers

### emailAddresses

    private java.util.List<java.lang.String> emailAddresses

  the e-mail addresses

### sipAddresses

    private java.util.List<java.lang.String> sipAddresses

  the sip addresses

### disclose

    private java.util.Set<ContactData.Field> disclose

  the disclosed fields

### remarks

    private java.util.List<java.lang.String> remarks

  the remarks

### changed

    private java.util.Date changed

  the change date

### disputeReference

    private boolean disputeReference

  flag whether contact is holder of a domain in dispute

Constructor Detail

### ContactData

    public ContactData()

  constructor

### ContactData

    public ContactData(ContactData other)

  copy constructor

  Parameters:
    `other` - the other contact to copy from

Method Detail

### toList

    public void toList(KVList list)
                throws EncodeException

  convert the object to a KV list as part of a contact request

  Parameters:
    `list` - the list
  Throws:
    `EncodeException` - on encoding exceptions

### fromList

    public void fromList(KVList list)
                  throws ResponseParseException

  parse the given key-value list.

  Parameters:
    `list` - the list to parse
  Throws:
    `ResponseParseException` - if the parsing failed

### isDisclosed

    private boolean isDisclosed(org.w3c.dom.Element el)
                         throws org.w3c.dom.DOMException

  return whether the element has the disclose attribute set

  Parameters:
    `el` - the element, may be `null`
  Returns:
    `true` if disclosed; `false` if `el` is `null`
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions

### parseField

    private java.lang.String parseField(org.w3c.dom.Node node,
                                        java.lang.String localName,
                                        ContactData.Field field)
                                 throws org.w3c.dom.DOMException

  parse a single field

  Parameters:
    `node` - the parent node
    `localName` - the local name
    `field` - the disclose field
  Returns:
    the value
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions

### parseField

    private void parseField(org.w3c.dom.Node node,
                            java.lang.String localName,
                            ContactData.Field field,
                            java.util.List<java.lang.String> list)
                     throws org.w3c.dom.DOMException

  parse a field consisting of multiple entries

  Parameters:
    `node` - the parent node
    `localName` - the local name
    `field` - the disclose field
    `list` - the list to fill
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions

### fromXml

    public void fromXml(org.w3c.dom.Element node)
                 throws org.w3c.dom.DOMException,
                        ResponseParseException

  parse the given XML subtree

  Parameters:
    `node` - the node containing the contact data
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions
    `ResponseParseException` - if the parsing failed

### add

    private void add(XmlBuilder xb,
                     java.lang.String localName,
                     java.lang.String value,
                     ContactData.Field field)
              throws org.w3c.dom.DOMException

  add an element to the builder

  Parameters:
    `xb` - the builder
    `localName` - the local name
    `value` - the value (may be `null`)
    `field` - the field
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions

### add

    private void add(XmlBuilder xb,
                     java.lang.String localName,
                     java.util.List<java.lang.String> values,
                     ContactData.Field field)
              throws org.w3c.dom.DOMException

  add elements for a list to the builder

  Parameters:
    `xb` - the builder
    `localName` - the local name
    `values` - the value (may be `null`)
    `field` - the field
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions

### toXml

    public void toXml(org.w3c.dom.Node node)
               throws org.w3c.dom.DOMException,
                      EncodeException

  convert the object to XML as part of a contact request

  Parameters:
    `node` - the node to add the contents to
  Throws:
    `org.w3c.dom.DOMException` - on DOM exceptions
    `EncodeException` - on encode exceptions

### toString

    public java.lang.String toString()

  convert the contact to a sting for debugging purposes

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation

### getHandle

    public java.lang.String getHandle()

  return the handle

  Returns:
    the handle or `null` if not set

### setHandle

    public void setHandle(java.lang.String theHandle)

  set the handle

  Parameters:
    `theHandle` - the handle, may be `null`

### getType

    public ContactData.Type getType()

  return the contact type

  Returns:
    the contact type or `null` if not set

### setType

    public void setType(ContactData.Type theType)

  set the type

  Parameters:
    `theType` - the type, may be `null`

### getName

    public java.lang.String getName()

  return the name

  Returns:
    the name

### setName

    public void setName(java.lang.String theName)

  set the name

  Parameters:
    `theName` - the name

### getOrganisation

    public java.util.List<java.lang.String> getOrganisation()

  return the organisation as a list of strings

  Returns:
    the list (read-only)

### getOrganisationAsArray

    public java.lang.String[] getOrganisationAsArray()

  return the organisation as an array

  Returns:
    the array

### setOrganisation

    public void setOrganisation(java.util.List<java.lang.String> list)

  set the organisation

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setOrganisation

    public void setOrganisation(java.lang.String... lines)

  set the organisation

  Parameters:
    `lines` - the lines of the organisation, may be `null`

### getAddress

    public java.util.List<java.lang.String> getAddress()

  return the address as a list of strings

  Returns:
    the list (read-only)

### getAddressAsArray

    public java.lang.String[] getAddressAsArray()

  return the address as an array

  Returns:
    the array or `null` if not set

### setAddress

    public void setAddress(java.util.List<java.lang.String> list)

  set the address

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setAddress

    public void setAddress(java.lang.String... lines)

  set the address

  Parameters:
    `lines` - the lines of the address, may be `null`

### getPostalCode

    public java.lang.String getPostalCode()

  return the postal code

  Returns:
    the postal code, may be `null`

### setPostalCode

    public void setPostalCode(java.lang.String code)

  set the postal code

  Parameters:
    `code` - the postal code, may be `null`

### getCity

    public java.lang.String getCity()

  return the city

  Returns:
    the city, may be `null`

### setCity

    public void setCity(java.lang.String theCity)

  set the city

  Parameters:
    `theCity` - the city, may be `null`

### getCountryCode

    public java.lang.String getCountryCode()

  return the country code

  Returns:
    the country code, may be `null`

### setCountryCode

    public void setCountryCode(java.lang.String code)

  set the country code

  Parameters:
    `code` - the country code, may be `null`

### getPhoneNumbers

    public java.util.List<java.lang.String> getPhoneNumbers()

  return the phone numbers as a list of strings

  Returns:
    the list (read-only)

### getPhoneNumbersAsArray

    public java.lang.String[] getPhoneNumbersAsArray()

  return the phone numbers as an array

  Returns:
    the array

### setPhoneNumbers

    public void setPhoneNumbers(java.util.List<java.lang.String> list)

  set the phone numbers

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setPhoneNumbers

    public void setPhoneNumbers(java.lang.String... numbers)

  set the phone numbers

  Parameters:
    `numbers` - the phone numbers, may be `null`

### getFaxNumbers

    public java.util.List<java.lang.String> getFaxNumbers()

  return the fax numbers as a list of strings

  Returns:
    the list (read-only)

### getFaxNumbersAsArray

    public java.lang.String[] getFaxNumbersAsArray()

  return the fax numbers as an array

  Returns:
    the array

### setFaxNumbers

    public void setFaxNumbers(java.util.List<java.lang.String> list)

  set the fax numbers

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setFaxNumbers

    public void setFaxNumbers(java.lang.String... numbers)

  set the fax numbers

  Parameters:
    `numbers` - the fax numbers, may be `null`

### getEMailAddresses

    public java.util.List<java.lang.String> getEMailAddresses()

  return the e-mail addresses as a list of strings

  Returns:
    the list (read-only)

### getEMailAddressesAsArray

    public java.lang.String[] getEMailAddressesAsArray()

  return the e-mail addresses as an array

  Returns:
    the array

### setEMailAddresses

    public void setEMailAddresses(java.util.List<java.lang.String> list)

  set the e-mail addresses

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setEMailAddresses

    public void setEMailAddresses(java.lang.String... addrs)

  set the e-mail addresses

  Parameters:
    `addrs` - the e-mail addresses, may be `null`

### getSipAddresses

    public java.util.List<java.lang.String> getSipAddresses()

  return the SIP addresses as a list of strings

  Returns:
    the list (read-only)

### getSipAddressesAsArray

    public java.lang.String[] getSipAddressesAsArray()

  return the SIP addresses as an array

  Returns:
    the array

### setSipAddresses

    public void setSipAddresses(java.util.List<java.lang.String> list)

  set the SIP addresses

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setSipAddresses

    public void setSipAddresses(java.lang.String... addrs)

  set the SIP addresses

  Parameters:
    `addrs` - the SIP addresses, may be `null`

### getDisclosedFields

    public java.util.Set<ContactData.Field> getDisclosedFields()

  return the disclosed fields

  Returns:
    the disclosed fields (read-only)

### setDisclosedFields

    public void setDisclosedFields(java.util.Collection<ContactData.Field> collection)

  set the disclosed fields

  Parameters:
    `collection` - the set of disclosed fields, may be `null`

### getRemarks

    public java.util.List<java.lang.String> getRemarks()

  return the remarks as a list of strings

  Returns:
    the list (read-only)

### getRemarksAsArray

    public java.lang.String[] getRemarksAsArray()

  return the remarks as an array

  Returns:
    the array

### setRemarks

    public void setRemarks(java.util.List<java.lang.String> list)

  set the remarks

  Parameters:
    `list` - the list of strings to initialize with, may be `null`

### setRemarks

    public void setRemarks(java.lang.String... lines)

  set the remarks

  Parameters:
    `lines` - the remarks, may be `null`

### getDisputeReference

    public boolean getDisputeReference()

  return whether the contact is referenced as a holder contact by a domain that is in the dispute state

  Returns:
    `true` if so

### getChangeDate

    public java.util.Date getChangeDate()

  return the change date

  Returns:
    the change date, may be `null`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2011 Knipp Medien und Kommunikation GmbH