Package com.verisign.epp.codec.domain
Class EPPDomainAddRemove
- java.lang.Object
-
- com.verisign.epp.codec.domain.EPPDomainAddRemove
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPDomainAddRemove extends java.lang.Object implements EPPCodecComponent
Represents attributes to add, remove or change with aEPPDomainUpdateCmd
. InEPPDomainUpdateCmd
, an instance ofEPPDomainAddRemove
is used to specify the attributes to add; an instance ofEPPDomainAddRemove
is used to specify the attributes to remove, and an instance ofEPPDomainAddRemove
is used to specify the attributes to change
The Domain Mapping Specification describes the following attributes:
- Zero or more <domain:ns> elements that contain the fully qualified
host name of a known host object. Use
getServers
andsetServers
to get and set the element. - Zero or more <domain:contact> elements that contain the registrant,
administrative, technical, and billing contact identifiers to be associated
with the domain. Use
getContacts
andsetContacts
to get and set the element. This attribute will only be allowed if the Contact Mapping is supported. - One or two <domain:status> elements that contain status values to
be applied to or removed from the domain object. Use
getStatuses
andsetStatuses
to get and set the element. - For
change
only, A <domain:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the domain object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the domain object. UsegetRegistrant
andsetRegistrant
to get and set the element.
It is important to note that the maximum number of domain attribute elements is subject to the number of values currently associated with the domain object.EPPDomainAddRemove
will delegate the validation of the cardinality of the domain attributes elements to the EPP Server.- See Also:
EPPDomainUpdateCmd
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static short
MODE_ADD
mode ofEPPDomainAddRemove
is to add attributes.static short
MODE_REMOVE
mode ofEPPDomainAddRemove
is to remove attributes.
-
Constructor Summary
Constructors Constructor Description EPPDomainAddRemove()
Default constructor forEPPDomainAddRemove
.EPPDomainAddRemove(java.lang.String aRegistrant, EPPAuthInfo aAuthInfo)
Constructor forEPPDomainAddRemove
that includes the attributes as arguments.EPPDomainAddRemove(java.util.Vector<?> aServers, java.util.Vector<EPPDomainContact> aContacts, java.util.Vector<EPPDomainStatus> aStatuses)
Constructor forEPPDomainAddRemove
that includes the attributes as arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContact(EPPDomainContact aContact)
Add a contact to the list of contacts.void
addServer(EPPHostAttr aServer)
Add a name server host attribute to the list of name servers.void
addServer(java.lang.String aServer)
Add a name server to the list of name servers.void
addStatus(EPPDomainStatus aStatus)
Add a status to the list of statuses.java.lang.Object
clone()
CloneEPPDomainAddRemove
.boolean
contactsSupported()
Return if Domain Contacts is supported.void
decode(org.w3c.dom.Element aElement)
Decode theEPPDomainAddRemove
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPDomainAddRemove
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPDomainAddRemove
compare.EPPAuthInfo
getAuthInfo()
Get authorization information for the change modejava.util.Vector<EPPDomainContact>
getContacts()
Gets the contacts to add or remove.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getRegistrant()
Get registrant for the change modejava.util.Vector<?>
getServers()
Gets the name servers.java.util.Vector<EPPDomainStatus>
getStatuses()
Gets the statuses to add or remove.boolean
hasAuthInfo()
Is the authorization information set?boolean
hasContacts()
Are contacts set?boolean
hasRegistrant()
is the registrant set?boolean
hasServers()
Are name servers set?boolean
hasStatuses()
Are statuses set?boolean
isEmpty()
Is theEPPDomainAddRemove
empty?void
setAuthInfo(EPPAuthInfo aAuthInfo)
Set authorization information for the change modevoid
setContacts(java.util.Vector<EPPDomainContact> aContacts)
Sets the contacts to add or remove.void
setRegistrant(java.lang.String aRegistrant)
Set registrant for the change mode.void
setServers(java.util.Vector<?> aServers)
Sets the name servers.void
setStatuses(java.util.Vector<EPPDomainStatus> aStatuses)
Sets the statuses to add or remove.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
MODE_ADD
public static final short MODE_ADD
mode ofEPPDomainAddRemove
is to add attributes.- See Also:
- Constant Field Values
-
MODE_REMOVE
public static final short MODE_REMOVE
mode ofEPPDomainAddRemove
is to remove attributes.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPDomainAddRemove
public EPPDomainAddRemove()
Default constructor forEPPDomainAddRemove
. All of the attribute default tonull
to indicate no modification.
-
EPPDomainAddRemove
public EPPDomainAddRemove(java.util.Vector<?> aServers, java.util.Vector<EPPDomainContact> aContacts, java.util.Vector<EPPDomainStatus> aStatuses)
Constructor forEPPDomainAddRemove
that includes the attributes as arguments.- Parameters:
aServers
- Vector of Name Server that are either name serverString
orEPPHostAttr
objects. Isnull
or empty for no modifications.aContacts
- Vector ofEPPDomainContact
instances. Isnull
or empty for no modifications. If the Contact Mapping is not supported, this value should benull
.aStatuses
- Vector ofEPPDomainStatus
instances. Isnull
or empty for no modifications.
-
EPPDomainAddRemove
public EPPDomainAddRemove(java.lang.String aRegistrant, EPPAuthInfo aAuthInfo)
Constructor forEPPDomainAddRemove
that includes the attributes as arguments.- Parameters:
aRegistrant
-String
registrant for the change modeaAuthInfo
-EPPAuthInfo
authorization information for the change mode
-
-
Method Detail
-
hasServers
public boolean hasServers()
Are name servers set?- Returns:
true
if name servers are set;false
otherwise.
-
addServer
public void addServer(java.lang.String aServer)
Add a name server to the list of name servers.- Parameters:
aServer
- Name server to add
-
addServer
public void addServer(EPPHostAttr aServer)
Add a name server host attribute to the list of name servers.- Parameters:
aServer
- Name server to add
-
getServers
public java.util.Vector<?> getServers()
Gets the name servers. The name servers can either beString
instances containing the fully qualified name of a known name server host object, orEPPHostAttr
instances containing the fully qualified name of a host and optionally the host IP addresses.- Returns:
Vector
of name serverString
instances for host object references orEPPHostAttr
instances for host attribute values if exists;null
otherwise.
-
setServers
public void setServers(java.util.Vector<?> aServers)
Sets the name servers. The name servers can either beString
instances containing the fully qualified name of a known name server host object, orEPPHostAttr
instances containing the fully qualified name of a host and optionally the host IP addresses.- Parameters:
aServers
-Vector
of name serverString
instances for host object references orEPPHostAttr
instances for host attribute values.
-
hasContacts
public boolean hasContacts()
Are contacts set?- Returns:
true
if contacts are set;false
otherwise.
-
addContact
public void addContact(EPPDomainContact aContact)
Add a contact to the list of contacts.- Parameters:
aContact
- Contact to add
-
getContacts
public java.util.Vector<EPPDomainContact> getContacts()
Gets the contacts to add or remove.- Returns:
- Vector of
EPPDomainContact
instances if set;null
otherwise.
-
setContacts
public void setContacts(java.util.Vector<EPPDomainContact> aContacts)
Sets the contacts to add or remove.- Parameters:
aContacts
- The contacts to add or remove.
-
hasStatuses
public boolean hasStatuses()
Are statuses set?- Returns:
true
if statuses are set;false
otherwise.
-
addStatus
public void addStatus(EPPDomainStatus aStatus)
Add a status to the list of statuses.- Parameters:
aStatus
- Status to add
-
getStatuses
public java.util.Vector<EPPDomainStatus> getStatuses()
Gets the statuses to add or remove.- Returns:
- Vector of status
EPPDomainStatus
instances if set;null
otherwise.
-
setStatuses
public void setStatuses(java.util.Vector<EPPDomainStatus> aStatuses)
Sets the statuses to add or remove.- Parameters:
aStatuses
- Vector of statusEPPDomainStatus
instances.
-
contactsSupported
public boolean contactsSupported()
Return if Domain Contacts is supported.- Returns:
true
if contacts are supported;false
otherwise.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPDomainAddRemove
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPDomainAddRemove
instance. - Throws:
EPPEncodeException
- Unable to encodeEPPDomainAddRemove
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPDomainAddRemove
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPDomainAddRemove
from.- Throws:
EPPDecodeException
- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPDomainAddRemove
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPDomainAddRemove
instance to compare with- Returns:
true
when equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPDomainAddRemove
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPDomainAddRemove
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
hasAuthInfo
public boolean hasAuthInfo()
Is the authorization information set?- Returns:
true
if the authorization information is set;false
otherwise.
-
getAuthInfo
public EPPAuthInfo getAuthInfo()
Get authorization information for the change mode- Returns:
EPPAuthInfo
if set;null
otherwise.
-
setAuthInfo
public void setAuthInfo(EPPAuthInfo aAuthInfo)
Set authorization information for the change mode- Parameters:
aAuthInfo
-EPPAuthInfo
instance. Passnull
to unset it.
-
hasRegistrant
public boolean hasRegistrant()
is the registrant set?- Returns:
true
if the registrant is set;false
otherwise.
-
getRegistrant
public java.lang.String getRegistrant()
Get registrant for the change mode- Returns:
- Registrant if set;
null
otherwise.
-
setRegistrant
public void setRegistrant(java.lang.String aRegistrant)
Set registrant for the change mode.- Parameters:
aRegistrant
- Registrant to set. Passnull
to unset it.
-
isEmpty
public boolean isEmpty()
Is theEPPDomainAddRemove
empty?- Returns:
true
if all of the attributes are not set;false
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-