Package com.verisign.epp.codec.domain
Class EPPDomainAddRemove
java.lang.Object
com.verisign.epp.codec.domain.EPPDomainAddRemove
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Represents attributes to add, remove or change with a
The Domain Mapping Specification describes the following attributes:
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.
EPPDomainUpdateCmd. In EPPDomainUpdateCmd, an instance of
EPPDomainAddRemove is used to specify the attributes to add; an
instance of EPPDomainAddRemove is used to specify the attributes to
remove, and an instance of EPPDomainAddRemove is used to specify the
attributes to changeThe 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.
EPPDomainAddRemove will delegate the validation of the
cardinality of the domain attributes elements to the EPP Server.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortmode ofEPPDomainAddRemoveis to add attributes.static final shortmode ofEPPDomainAddRemoveis to remove attributes. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPDomainAddRemove.EPPDomainAddRemove(String aRegistrant, EPPAuthInfo aAuthInfo) Constructor forEPPDomainAddRemovethat includes the attributes as arguments.EPPDomainAddRemove(Vector<?> aServers, Vector<EPPDomainContact> aContacts, Vector<EPPDomainStatus> aStatuses) Constructor forEPPDomainAddRemovethat includes the attributes as arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(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.voidAdd a name server to the list of name servers.voidaddStatus(EPPDomainStatus aStatus) Add a status to the list of statuses.clone()CloneEPPDomainAddRemove.booleanReturn if Domain Contacts is supported.voidDecode theEPPDomainAddRemoveattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPDomainAddRemoveinstance.booleanimplements a deepEPPDomainAddRemovecompare.Get authorization information for the change modeGets the contacts to add or remove.Returns the XML namespace associated with theEPPCodecComponent.Get registrant for the change modeVector<?> Gets the name servers.Gets the statuses to add or remove.booleanIs the authorization information set?booleanAre contacts set?booleanis the registrant set?booleanAre name servers set?booleanAre statuses set?booleanisEmpty()Is theEPPDomainAddRemoveempty?voidsetAuthInfo(EPPAuthInfo aAuthInfo) Set authorization information for the change modevoidsetContacts(Vector<EPPDomainContact> aContacts) Sets the contacts to add or remove.voidsetRegistrant(String aRegistrant) Set registrant for the change mode.voidsetServers(Vector<?> aServers) Sets the name servers.voidsetStatuses(Vector<EPPDomainStatus> aStatuses) Sets the statuses to add or remove.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
MODE_ADD
public static final short MODE_ADDmode ofEPPDomainAddRemoveis to add attributes.- See Also:
-
MODE_REMOVE
public static final short MODE_REMOVEmode ofEPPDomainAddRemoveis to remove attributes.- See Also:
-
-
Constructor Details
-
EPPDomainAddRemove
public EPPDomainAddRemove()Default constructor forEPPDomainAddRemove. All of the attribute default tonullto indicate no modification. -
EPPDomainAddRemove
public EPPDomainAddRemove(Vector<?> aServers, Vector<EPPDomainContact> aContacts, 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
Constructor forEPPDomainAddRemovethat includes the attributes as arguments.- Parameters:
aRegistrant-Stringregistrant for the change modeaAuthInfo-EPPAuthInfoauthorization information for the change mode
-
-
Method Details
-
hasServers
public boolean hasServers()Are name servers set?- Returns:
trueif name servers are set;falseotherwise.
-
addServer
Add a name server to the list of name servers.- Parameters:
aServer- Name server to add
-
addServer
Add a name server host attribute to the list of name servers.- Parameters:
aServer- Name server to add
-
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
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
Add a contact to the list of contacts.- Parameters:
aContact- Contact to add
-
getContacts
Gets the contacts to add or remove.- Returns:
- Vector of
EPPDomainContactinstances if set;nullotherwise.
-
setContacts
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
Add a status to the list of statuses.- Parameters:
aStatus- Status to add
-
getStatuses
Gets the statuses to add or remove.- Returns:
- Vector of status
EPPDomainStatusinstances if set;nullotherwise.
-
setStatuses
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
Encode 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
Decode 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
implements a deepEPPDomainAddRemovecompare. -
clone
CloneEPPDomainAddRemove.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPDomainAddRemove - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
hasAuthInfo
public boolean hasAuthInfo()Is the authorization information set?- Returns:
trueif the authorization information is set;falseotherwise.
-
getAuthInfo
Get authorization information for the change mode- Returns:
EPPAuthInfoif set;nullotherwise.
-
setAuthInfo
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
Get registrant for the change mode- Returns:
- Registrant if set;
nullotherwise.
-
setRegistrant
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
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-