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 newEPPPurpose
with different child elements based on the input parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPPurpose
.void
decode(org.w3c.dom.Element aElement)
decodeEPPPurpose
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPPurpose
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements aEPPPurpose
compare.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
isAdmin()
<admin> element set?boolean
isContact()
<contact> element set?boolean
isOther()
<other> element set?boolean
isProv()
<prov> element set?void
setAdmin(boolean aAdmin)
Sets the <admin> element to specify contact for administrative purposes.void
setContact(boolean aContact)
Sets the <contact> element to specify contact for marketing purposes.void
setOther(boolean aOther)
Sets the <other> element to specify Other purposes.void
setProv(boolean aProv)
Sets the <prov> element to specify object provisioning purposes.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Constructor Detail
-
EPPPurpose
public EPPPurpose()
Default Constructor
-
EPPPurpose
public EPPPurpose(boolean aAdmin, boolean aContact, boolean aOther, boolean aProv)
Allocates a newEPPPurpose
with different child elements based on the input parameters.- Parameters:
aAdmin
- If set totrue
then the elementadmin
is createdaContact
- If set totrue
then the elementcontact
is createdaOther
- If set totrue
then the elementother
is createdaProv
- If set totrue
then the elementprov
is created
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
<admin> element set?- Returns:
true
if is set;false
otherwise.
-
setAdmin
public void setAdmin(boolean aAdmin)
Sets the <admin> element to specify contact for administrative purposes.- Parameters:
aAdmin
-true
to include the <admin> element;false
otherwise.
-
isContact
public boolean isContact()
<contact> element set?- Returns:
true
if is set;false
otherwise.
-
setContact
public void setContact(boolean aContact)
Sets the <contact> element to specify contact for marketing purposes.- Parameters:
aContact
-true
to include the <contact> element;false
otherwise.
-
isOther
public boolean isOther()
<other> element set?- Returns:
true
if is set;false
otherwise.
-
setOther
public void setOther(boolean aOther)
Sets the <other> element to specify Other purposes.- Parameters:
aOther
-true
to include the <other> element;false
otherwise.
-
isProv
public boolean isProv()
<prov> element set?- Returns:
true
if is set;false
otherwise.
-
setProv
public void setProv(boolean aProv)
Sets the <prov> element to specify object provisioning purposes.- Parameters:
aProv
-true
to include the <prov> element;false
otherwise.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPPurpose
into a DOM element tree. The "purpose" element is created and the child nodes are appended as children.- Specified by:
encode
in 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 EPPDecodeException
decodeEPPPurpose
from a DOM element tree. TheaElement
argument needs to be the <purpose> element for aEPPPurpose
- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- root element tree.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements aEPPPurpose
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPPurpose
instance to compare with- Returns:
true
if equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPPurpose
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
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
.
-
-