|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.ContactData
public class ContactData
class that holds contact data, both for requests and responses
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 |
---|
private java.lang.String handle
private ContactData.Type type
private java.lang.String name
private java.util.List<java.lang.String> organisation
private java.util.List<java.lang.String> address
private java.lang.String postalCode
private java.lang.String city
private java.lang.String countryCode
private java.util.List<java.lang.String> phoneNumbers
private java.util.List<java.lang.String> faxNumbers
private java.util.List<java.lang.String> emailAddresses
private java.util.List<java.lang.String> sipAddresses
private java.util.Set<ContactData.Field> disclose
private java.util.List<java.lang.String> remarks
private java.util.Date changed
private boolean disputeReference
Constructor Detail |
---|
public ContactData()
public ContactData(ContactData other)
other
- the other contact to copy fromMethod Detail |
---|
public void toList(KVList list) throws EncodeException
list
- the list
EncodeException
- on encoding exceptionspublic void fromList(KVList list) throws ResponseParseException
list
- the list to parse
ResponseParseException
- if the parsing failedprivate boolean isDisclosed(org.w3c.dom.Element el) throws org.w3c.dom.DOMException
el
- the element, may be null
true
if disclosed;
false
if el
is
null
org.w3c.dom.DOMException
- on DOM exceptionsprivate java.lang.String parseField(org.w3c.dom.Node node, java.lang.String localName, ContactData.Field field) throws org.w3c.dom.DOMException
node
- the parent nodelocalName
- the local namefield
- the disclose field
org.w3c.dom.DOMException
- on DOM exceptionsprivate 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
node
- the parent nodelocalName
- the local namefield
- the disclose fieldlist
- the list to fill
org.w3c.dom.DOMException
- on DOM exceptionspublic void fromXml(org.w3c.dom.Element node) throws org.w3c.dom.DOMException, ResponseParseException
node
- the node containing the contact data
org.w3c.dom.DOMException
- on DOM exceptions
ResponseParseException
- if the parsing failedprivate void add(XmlBuilder xb, java.lang.String localName, java.lang.String value, ContactData.Field field) throws org.w3c.dom.DOMException
xb
- the builderlocalName
- the local namevalue
- the value (may be null
)field
- the field
org.w3c.dom.DOMException
- on DOM exceptionsprivate void add(XmlBuilder xb, java.lang.String localName, java.util.List<java.lang.String> values, ContactData.Field field) throws org.w3c.dom.DOMException
xb
- the builderlocalName
- the local namevalues
- the value (may be null
)field
- the field
org.w3c.dom.DOMException
- on DOM exceptionspublic void toXml(org.w3c.dom.Node node) throws org.w3c.dom.DOMException, EncodeException
node
- the node to add the contents to
org.w3c.dom.DOMException
- on DOM exceptions
EncodeException
- on encode exceptionspublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getHandle()
null
if not setpublic void setHandle(java.lang.String theHandle)
theHandle
- the handle, may be null
public ContactData.Type getType()
null
if not setpublic void setType(ContactData.Type theType)
theType
- the type, may be null
public java.lang.String getName()
public void setName(java.lang.String theName)
theName
- the namepublic java.util.List<java.lang.String> getOrganisation()
public java.lang.String[] getOrganisationAsArray()
public void setOrganisation(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setOrganisation(java.lang.String... lines)
lines
- the lines of the organisation, may be null
public java.util.List<java.lang.String> getAddress()
public java.lang.String[] getAddressAsArray()
null
if not setpublic void setAddress(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setAddress(java.lang.String... lines)
lines
- the lines of the address, may be null
public java.lang.String getPostalCode()
null
public void setPostalCode(java.lang.String code)
code
- the postal code, may be null
public java.lang.String getCity()
null
public void setCity(java.lang.String theCity)
theCity
- the city, may be null
public java.lang.String getCountryCode()
null
public void setCountryCode(java.lang.String code)
code
- the country code, may be null
public java.util.List<java.lang.String> getPhoneNumbers()
public java.lang.String[] getPhoneNumbersAsArray()
public void setPhoneNumbers(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setPhoneNumbers(java.lang.String... numbers)
numbers
- the phone numbers, may be null
public java.util.List<java.lang.String> getFaxNumbers()
public java.lang.String[] getFaxNumbersAsArray()
public void setFaxNumbers(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setFaxNumbers(java.lang.String... numbers)
numbers
- the fax numbers, may be null
public java.util.List<java.lang.String> getEMailAddresses()
public java.lang.String[] getEMailAddressesAsArray()
public void setEMailAddresses(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setEMailAddresses(java.lang.String... addrs)
addrs
- the e-mail addresses, may be null
public java.util.List<java.lang.String> getSipAddresses()
public java.lang.String[] getSipAddressesAsArray()
public void setSipAddresses(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setSipAddresses(java.lang.String... addrs)
addrs
- the SIP addresses, may be null
public java.util.Set<ContactData.Field> getDisclosedFields()
public void setDisclosedFields(java.util.Collection<ContactData.Field> collection)
collection
- the set of disclosed fields, may be null
public java.util.List<java.lang.String> getRemarks()
public java.lang.String[] getRemarksAsArray()
public void setRemarks(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setRemarks(java.lang.String... lines)
lines
- the remarks, may be null
public boolean getDisputeReference()
true
if sopublic java.util.Date getChangeDate()
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |