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 ofEPPDomainAddRemoveis used to specify the attributes to add; an instance ofEPPDomainAddRemoveis used to specify the attributes to remove, and an instance ofEPPDomainAddRemoveis 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
getServersandsetServersto 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
getContactsandsetContactsto 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
getStatusesandsetStatusesto get and set the element. - For
changeonly, 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. UsegetRegistrantandsetRegistrantto 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.EPPDomainAddRemovewill 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 shortMODE_ADDmode ofEPPDomainAddRemoveis to add attributes.static shortMODE_REMOVEmode ofEPPDomainAddRemoveis to remove attributes.
-
Constructor Summary
Constructors Constructor Description EPPDomainAddRemove()Default constructor forEPPDomainAddRemove.EPPDomainAddRemove(java.lang.String aRegistrant, EPPAuthInfo aAuthInfo)Constructor forEPPDomainAddRemovethat includes the attributes as arguments.EPPDomainAddRemove(java.util.Vector<?> aServers, java.util.Vector<EPPDomainContact> aContacts, java.util.Vector<EPPDomainStatus> aStatuses)Constructor forEPPDomainAddRemovethat includes the attributes as arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContact(EPPDomainContact aContact)Add a contact to the list of contacts.voidaddServer(EPPHostAttr aServer)Add a name server host attribute to the list of name servers.voidaddServer(java.lang.String aServer)Add a name server to the list of name servers.voidaddStatus(EPPDomainStatus aStatus)Add a status to the list of statuses.java.lang.Objectclone()CloneEPPDomainAddRemove.booleancontactsSupported()Return if Domain Contacts is supported.voiddecode(org.w3c.dom.Element aElement)Decode theEPPDomainAddRemoveattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPDomainAddRemoveinstance.booleanequals(java.lang.Object aObject)implements a deepEPPDomainAddRemovecompare.EPPAuthInfogetAuthInfo()Get authorization information for the change modejava.util.Vector<EPPDomainContact>getContacts()Gets the contacts to add or remove.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetRegistrant()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.booleanhasAuthInfo()Is the authorization information set?booleanhasContacts()Are contacts set?booleanhasRegistrant()is the registrant set?booleanhasServers()Are name servers set?booleanhasStatuses()Are statuses set?booleanisEmpty()Is theEPPDomainAddRemoveempty?voidsetAuthInfo(EPPAuthInfo aAuthInfo)Set authorization information for the change modevoidsetContacts(java.util.Vector<EPPDomainContact> aContacts)Sets the contacts to add or remove.voidsetRegistrant(java.lang.String aRegistrant)Set registrant for the change mode.voidsetServers(java.util.Vector<?> aServers)Sets the name servers.voidsetStatuses(java.util.Vector<EPPDomainStatus> aStatuses)Sets the statuses to add or remove.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
MODE_ADD
public static final short MODE_ADD
mode ofEPPDomainAddRemoveis to add attributes.- See Also:
- Constant Field Values
-
MODE_REMOVE
public static final short MODE_REMOVE
mode ofEPPDomainAddRemoveis to remove attributes.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPDomainAddRemove
public EPPDomainAddRemove()
Default constructor forEPPDomainAddRemove. All of the attribute default tonullto indicate no modification.
-
EPPDomainAddRemove
public EPPDomainAddRemove(java.util.Vector<?> aServers, java.util.Vector<EPPDomainContact> aContacts, java.util.Vector<EPPDomainStatus> aStatuses)Constructor forEPPDomainAddRemovethat includes the attributes as arguments.- Parameters:
aServers- Vector of Name Server that are either name serverStringorEPPHostAttrobjects. Isnullor empty for no modifications.aContacts- Vector ofEPPDomainContactinstances. Isnullor empty for no modifications. If the Contact Mapping is not supported, this value should benull.aStatuses- Vector ofEPPDomainStatusinstances. Isnullor empty for no modifications.
-
EPPDomainAddRemove
public EPPDomainAddRemove(java.lang.String aRegistrant, EPPAuthInfo aAuthInfo)Constructor forEPPDomainAddRemovethat includes the attributes as arguments.- Parameters:
aRegistrant-Stringregistrant for the change modeaAuthInfo-EPPAuthInfoauthorization information for the change mode
-
-
Method Detail
-
hasServers
public boolean hasServers()
Are name servers set?- Returns:
trueif name servers are set;falseotherwise.
-
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 beStringinstances containing the fully qualified name of a known name server host object, orEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Returns:
Vectorof name serverStringinstances for host object references orEPPHostAttrinstances for host attribute values if exists;nullotherwise.
-
setServers
public void setServers(java.util.Vector<?> aServers)
Sets the name servers. The name servers can either beStringinstances containing the fully qualified name of a known name server host object, orEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Parameters:
aServers-Vectorof name serverStringinstances for host object references orEPPHostAttrinstances for host attribute values.
-
hasContacts
public boolean hasContacts()
Are contacts set?- Returns:
trueif contacts are set;falseotherwise.
-
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
EPPDomainContactinstances if set;nullotherwise.
-
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:
trueif statuses are set;falseotherwise.
-
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
EPPDomainStatusinstances if set;nullotherwise.
-
setStatuses
public void setStatuses(java.util.Vector<EPPDomainStatus> aStatuses)
Sets the statuses to add or remove.- Parameters:
aStatuses- Vector of statusEPPDomainStatusinstances.
-
contactsSupported
public boolean contactsSupported()
Return if Domain Contacts is supported.- Returns:
trueif contacts are supported;falseotherwise.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPDomainAddRemoveinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPDomainAddRemoveinstance. - Throws:
EPPEncodeException- Unable to encodeEPPDomainAddRemoveinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPDomainAddRemoveattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPDomainAddRemovefrom.- Throws:
EPPDecodeException- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPDomainAddRemovecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPDomainAddRemoveinstance to compare with- Returns:
truewhen equal;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPDomainAddRemove.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
hasAuthInfo
public boolean hasAuthInfo()
Is the authorization information set?- Returns:
trueif the authorization information is set;falseotherwise.
-
getAuthInfo
public EPPAuthInfo getAuthInfo()
Get authorization information for the change mode- Returns:
EPPAuthInfoif set;nullotherwise.
-
setAuthInfo
public void setAuthInfo(EPPAuthInfo aAuthInfo)
Set authorization information for the change mode- Parameters:
aAuthInfo-EPPAuthInfoinstance. Passnullto unset it.
-
hasRegistrant
public boolean hasRegistrant()
is the registrant set?- Returns:
trueif the registrant is set;falseotherwise.
-
getRegistrant
public java.lang.String getRegistrant()
Get registrant for the change mode- Returns:
- Registrant if set;
nullotherwise.
-
setRegistrant
public void setRegistrant(java.lang.String aRegistrant)
Set registrant for the change mode.- Parameters:
aRegistrant- Registrant to set. Passnullto unset it.
-
isEmpty
public boolean isEmpty()
Is theEPPDomainAddRemoveempty?- Returns:
trueif all of the attributes are not set;falseotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-