Package com.verisign.epp.codec.gen
Class EPPPurpose
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPPurpose
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPPurpose extends java.lang.Object implements EPPCodecComponent
The <purpose> element MUST contain one or more of the following child elements that describe the purposes for which data is collected:
- <admin/>: Administrative purposes. Information can be used for administrative and technical support of the provisioning system.
- <contact/>: Contact for marketing purposes. Information can be used to contact individuals, through a communications channel other than the protocol, for the promotion of a product or service.
- <prov/>: Object provisioning purposes. Information can be used to identify objects and inter-object relationships.
- <other/>: Other purposes. Information may be used in other ways not captured by the above definitions.
- See Also:
EPPStatement, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPPurpose()Default ConstructorEPPPurpose(boolean aAdmin, boolean aContact, boolean aOther, boolean aProv)Allocates a newEPPPurposewith different child elements based on the input parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPPurpose.voiddecode(org.w3c.dom.Element aElement)decodeEPPPurposefrom a DOM element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)encodeEPPPurposeinto a DOM element tree.booleanequals(java.lang.Object aObject)implements aEPPPurposecompare.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.booleanisAdmin()<admin> element set?booleanisContact()<contact> element set?booleanisOther()<other> element set?booleanisProv()<prov> element set?voidsetAdmin(boolean aAdmin)Sets the <admin> element to specify contact for administrative purposes.voidsetContact(boolean aContact)Sets the <contact> element to specify contact for marketing purposes.voidsetOther(boolean aOther)Sets the <other> element to specify Other purposes.voidsetProv(boolean aProv)Sets the <prov> element to specify object provisioning purposes.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Constructor Detail
-
EPPPurpose
public EPPPurpose()
Default Constructor
-
EPPPurpose
public EPPPurpose(boolean aAdmin, boolean aContact, boolean aOther, boolean aProv)Allocates a newEPPPurposewith different child elements based on the input parameters.- Parameters:
aAdmin- If set totruethen the elementadminis createdaContact- If set totruethen the elementcontactis createdaOther- If set totruethen the elementotheris createdaProv- If set totruethen the elementprovis created
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
<admin> element set?- Returns:
trueif is set;falseotherwise.
-
setAdmin
public void setAdmin(boolean aAdmin)
Sets the <admin> element to specify contact for administrative purposes.- Parameters:
aAdmin-trueto include the <admin> element;falseotherwise.
-
isContact
public boolean isContact()
<contact> element set?- Returns:
trueif is set;falseotherwise.
-
setContact
public void setContact(boolean aContact)
Sets the <contact> element to specify contact for marketing purposes.- Parameters:
aContact-trueto include the <contact> element;falseotherwise.
-
isOther
public boolean isOther()
<other> element set?- Returns:
trueif is set;falseotherwise.
-
setOther
public void setOther(boolean aOther)
Sets the <other> element to specify Other purposes.- Parameters:
aOther-trueto include the <other> element;falseotherwise.
-
isProv
public boolean isProv()
<prov> element set?- Returns:
trueif is set;falseotherwise.
-
setProv
public void setProv(boolean aProv)
Sets the <prov> element to specify object provisioning purposes.- Parameters:
aProv-trueto include the <prov> element;falseotherwise.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionencodeEPPPurposeinto a DOM element tree. The "purpose" element is created and the child nodes are appended as children.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOCUMENT ME!- Returns:
- purpose root element tree.
- Throws:
EPPEncodeException- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptiondecodeEPPPurposefrom a DOM element tree. TheaElementargument needs to be the <purpose> element for aEPPPurpose- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- root element tree.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements aEPPPurposecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPPurposeinstance to compare with- Returns:
trueif equal;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPPurpose.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPPurpose - 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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-