public class DomainData
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DomainData.DomainState
enumeration for the different states of the domain
|
static class |
DomainData.Ref
class that represents a reference to a contact.
|
static class |
DomainData.Role
enumeration for the different contact roles within the domain
|
Modifier and Type | Field and Description |
---|---|
private java.util.Date |
authInfo1ExpireDate
the date AuthInfo 1 expires (
null if not set or unknown) |
private java.util.Date |
authInfo2ExpireDate
the date AuthInfo 2 expires (
null if not set or unknown) |
private boolean |
authInfosSet
flag whether either AuthInfo 1 or AuthInfo 2 is set
|
private java.util.Date |
changeDate
the last change date
|
private java.lang.String |
changeProvAuthInfo
the AuthInfo text for the change provider operation
|
private java.util.List<DomainData.Ref> |
contacts
the list of contacts
|
private static java.lang.String[] |
contactSectionNames |
private static DomainData.Role[] |
contactSectionRoles
the types of the contact sections; order must be synchronized with
contactSectionNames |
private java.util.List<DnsEntry> |
dns
the DNS related data
|
private java.lang.String |
domainName
the domain name
|
private DomainData.DomainState |
domainState
the domain state
|
private java.lang.String |
encodedDomainName
the encoded domain name
|
private java.util.Date |
expireDate
expire date
|
private boolean |
inDispute
flag whether domain is in dispute
|
private java.lang.String |
regAccID
the registration account ID
|
private java.lang.String |
regAccName
the registration account name
|
Constructor and Description |
---|
DomainData()
constructor
|
DomainData(DomainData other,
boolean deepCopy)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addContact(DomainData.Ref ref)
add a single contact
|
void |
addContact(DomainData.Role role,
ContactData contact)
add a single contact
|
void |
addContacts(java.util.Collection<DomainData.Ref> refs)
add all given contacts
|
void |
addContacts(DomainData.Ref... refs)
add all given contacts
|
void |
addContacts(DomainData.Role role,
ContactData... theContacts)
add all given contacts
|
void |
addContacts(DomainData.Role role,
java.lang.Iterable<ContactData> theContacts)
add all given contacts
|
void |
addDnsEntries(java.util.Collection<? extends DnsEntry> entries)
add all entries to the DNS configuration
|
void |
addDnsEntries(DnsEntry... entries)
add all entries to the DNS configuration
|
void |
addDnsEntry(DnsEntry entry)
add an entry to the DNS configuration
|
void |
clearContacts()
clear all contact references
|
void |
clearContacts(DomainData.Role role)
clear all contact references with the given role
|
void |
clearDnsEntries()
clear all DNS entries
|
void |
fromList(KVMultiList list)
parse the given key-value list.
|
void |
fromXml(org.w3c.dom.Element node)
parse the given XML subtree
|
java.util.Date |
getAuthInfo1ExpireDate()
return the expire date for the AuthInfo 1
|
java.util.Date |
getAuthInfo2ExpireDate()
return the expire date for the AuthInfo 2
|
java.util.Date |
getChangeDate()
return the change date
|
java.lang.String |
getChangeProvAuthInfo()
return the AuthInfo that shall be used for the change provider operation
|
java.util.List<DomainData.Ref> |
getContactRefs()
return the list of contact references
|
java.util.List<ContactData> |
getContacts(DomainData.Role role)
return a list of contacts with the given role
|
java.util.List<DnsEntry> |
getDnsEntries()
return the DNS entries
|
java.lang.String |
getDomainName()
return the domain name
|
DomainData.DomainState |
getDomainState()
return the domain state
|
java.lang.String |
getEncodedDomainName()
return the encoded domain name
|
java.util.Date |
getExpireDate()
return the expiration date
|
ContactData |
getFirstContact(DomainData.Role role)
return the first contact of the given role
|
java.lang.String |
getProvider()
Deprecated.
use
getRegAccID()
instead for symmetry with
getRegAccName() .
This method will be removed in a future
version |
java.lang.String |
getRegAccID()
return the registration account ID of the domain
|
java.lang.String |
getRegAccName()
return the registration account name of the domain
|
boolean |
hasAnyAuthInfos()
return whether any of the two AutInfos are valid; if the extended
info response (own domain or "with provider" flag) is retrieved,
which does not contain the flag, the value is set to
true
if at least one of the two expire dates is given. |
void |
setChangeProvAuthInfo(java.lang.String authInfo)
set the AuthInfo that shall be used for the change provider
operation
|
void |
setDomainName(java.lang.String theDomainName)
set the domain name.
|
void |
setDomainName(java.lang.String theDomainName,
java.lang.String theEncodedDomainName)
set the domain name
|
void |
toList(KVList list,
boolean addDns)
convert the object to a KV list as part of a domain request
(create, update, chholder, chprov, delete)
|
java.lang.String |
toString()
convert the object to a string (for debugging purposes)
|
void |
toXml(org.w3c.dom.Node node,
boolean addDns)
convert the object to XML as part of a domain request
(create, update, chholder, chprov, delete)
|
private java.lang.String domainName
private java.lang.String encodedDomainName
private DomainData.DomainState domainState
private java.util.List<DomainData.Ref> contacts
private java.util.List<DnsEntry> dns
private java.util.Date changeDate
private java.util.Date expireDate
private boolean inDispute
private java.lang.String changeProvAuthInfo
private java.lang.String regAccID
private java.lang.String regAccName
private java.util.Date authInfo1ExpireDate
null
if not set or unknown)private java.util.Date authInfo2ExpireDate
null
if not set or unknown)private boolean authInfosSet
private static final java.lang.String[] contactSectionNames
private static final DomainData.Role[] contactSectionRoles
contactSectionNames
public DomainData()
public DomainData(DomainData other, boolean deepCopy)
other
- the instance to copy fromdeepCopy
- if true
, a deep copy is
performed, i.e. copies from referenced
mutable objects are also createdpublic void toList(KVList list, boolean addDns) throws EncodeException
list
- the listaddDns
- if true
, DNS data is addedEncodeException
- on encoding exceptionspublic void fromList(KVMultiList list) throws ResponseParseException
list
- the list to parseResponseParseException
- if the parsing failedpublic void toXml(org.w3c.dom.Node node, boolean addDns) throws org.w3c.dom.DOMException, EncodeException
node
- the node to add the contents toaddDns
- if true
, DNS data is addedorg.w3c.dom.DOMException
- on DOM exceptionsEncodeException
- on encode exceptionspublic void fromXml(org.w3c.dom.Element node) throws org.w3c.dom.DOMException, ResponseParseException
node
- the node containing the contact data
(infoDataType)org.w3c.dom.DOMException
- on DOM exceptionsResponseParseException
- if the parsing failedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDomainName()
public java.lang.String getEncodedDomainName()
public void setDomainName(java.lang.String theDomainName)
theDomainName
- the domain namepublic void setDomainName(java.lang.String theDomainName, java.lang.String theEncodedDomainName)
theDomainName
- the domain nametheEncodedDomainName
- the encoded domain name, may be null
for ASCII-only domainspublic DomainData.DomainState getDomainState()
public java.lang.String getProvider()
getRegAccID()
instead for symmetry with
getRegAccName()
.
This method will be removed in a future
versionnull
)public java.lang.String getChangeProvAuthInfo()
null
if none is availablepublic void setChangeProvAuthInfo(java.lang.String authInfo)
authInfo
- the AuthInfo or null
if none
is availablepublic java.lang.String getRegAccID()
null
if
not provided by the registrypublic java.lang.String getRegAccName()
null
if
not provided by the registrypublic java.util.Date getAuthInfo1ExpireDate()
null
if it is not set
or not provided by the registry, i.e. if the
domain is not managed by the registrar and the
"with provider" flag has not been set in the requestpublic java.util.Date getAuthInfo2ExpireDate()
null
if it is not set
or not provided by the registry, i.e. if the
domain is not managed by the registrar and the
"with provider" flag has not been set in the requestpublic boolean hasAnyAuthInfos()
true
if at least one of the two expire dates is given.true
if the domain has valid AuthInfospublic java.util.List<DomainData.Ref> getContactRefs()
public java.util.List<ContactData> getContacts(DomainData.Role role)
role
- the rolepublic ContactData getFirstContact(DomainData.Role role)
role
- the rolenull
if
there are no contacts of that rolepublic void clearContacts()
public void clearContacts(DomainData.Role role)
role
- the role to clearpublic void addContact(DomainData.Role role, ContactData contact)
role
- the rolecontact
- the contactpublic void addContacts(DomainData.Role role, ContactData... theContacts)
role
- the roletheContacts
- the contactspublic void addContacts(DomainData.Role role, java.lang.Iterable<ContactData> theContacts)
role
- the roletheContacts
- the contactspublic void addContact(DomainData.Ref ref)
ref
- the referencepublic void addContacts(DomainData.Ref... refs)
refs
- the referencespublic void addContacts(java.util.Collection<DomainData.Ref> refs)
refs
- the referencespublic java.util.List<DnsEntry> getDnsEntries()
public void clearDnsEntries()
public void addDnsEntry(DnsEntry entry)
entry
- the entry to addpublic void addDnsEntries(DnsEntry... entries)
entries
- the entries to addpublic void addDnsEntries(java.util.Collection<? extends DnsEntry> entries)
entries
- the entriespublic java.util.Date getExpireDate()
null
if the domain does not expirepublic java.util.Date getChangeDate()
null
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH