Package com.verisign.epp.codec.gen
Class EPPRecipient
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPRecipient
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRecipient extends java.lang.Object implements EPPCodecComponent
Identifies the Recipient DataCollectionPolicy supported by the server:- <other> other entities following unknown practices
- <ours> server operator and or servers operator agents
- <public> public forums
- <same> other entities following server practices
- <unrelated> unrelated third parties.
- Use methods
setOther
,setPublic
,setSame
,setUnRelated
with a boolean value of true to create the necessary child element nodes. UsesetOurs
to set aVector
of ours child element nodes with optional descriptions.
- See Also:
EPPStatement
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPRecipient()
Default constructor.EPPRecipient(boolean aOther, java.util.Vector aOurs, boolean aPublic, boolean aSame, boolean aUnrelated)
Allocates a newEPPRecipient
with differnt child elements based on the input parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOurs(java.lang.String aOursDesc)
Add <ours> element with an optional description.java.lang.Object
clone()
CloneEPPRecipient
.void
decode(org.w3c.dom.Element aElement)
decodeEPPRecipient
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPRecipient
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPRecipient
compare.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.Vector
getOurs()
Gets the ours recipient descriptions.boolean
isOther()
<other> element set?boolean
isPublic()
<public> element set?boolean
isSame()
<same> element set?boolean
isUnrelated()
<unrelated> element set?void
setOther(boolean aOther)
Sets the <other> element.void
setOurs(java.util.Vector aOurs)
Sets the <ours> elements that include a descriptionString
perours
element.void
setPublic(boolean aPublic)
Sets the <public> element to specify public forums.void
setSame(boolean aSame)
Sets the <same> element to specify other entities following server practices.void
setUnrelated(boolean aUnrelated)
Sets the <unrelated> element to specify Unrelated third parties.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Constructor Detail
-
EPPRecipient
public EPPRecipient()
Default constructor.
-
EPPRecipient
public EPPRecipient(boolean aOther, java.util.Vector aOurs, boolean aPublic, boolean aSame, boolean aUnrelated)
Allocates a newEPPRecipient
with differnt child elements based on the input parameters. The child element are created based on the following input parameter values:
- if aOther parameter is set to true then the other element
other
is created - if aOurs
Vector
ofString
that describes the recipient. Anull String
indicates that the recipient has no description. - if aPublic parameter is set to true then the public element
public
is created - if aSame parameter is set to true then the same element
same
is created - if aUnrelated parameter is set to true then the unrelated element
unrelated
is created
- Parameters:
aOther
- DOCUMENT ME!aOurs
- DOCUMENT ME!aPublic
- DOCUMENT ME!aSame
- DOCUMENT ME!aUnrelated
- DOCUMENT ME!
- if aOther parameter is set to true then the other element
-
-
Method Detail
-
isOther
public boolean isOther()
<other> element set?- Returns:
true
if is set;false
otherwise.
-
setOther
public void setOther(boolean aOther)
Sets the <other> element.- Parameters:
aOther
-true
to include the <other> element;false
otherwise.
-
getOurs
public java.util.Vector getOurs()
Gets the ours recipient descriptions. Anull
description indicates a ours recipient without a description.- Returns:
Vector
ofString
ours descriptions if defined;null
otherwise.
-
setOurs
public void setOurs(java.util.Vector aOurs)
Sets the <ours> elements that include a descriptionString
perours
element. Anull
String
indicates no description for the <ours> element.- Parameters:
aOurs
-Vector
of nullableString
<ours> descriptions
-
addOurs
public void addOurs(java.lang.String aOursDesc)
Add <ours> element with an optional description. A non-null
aOursDesc represents a description, while anull
value represents a <ours> element without a description.- Parameters:
aOursDesc
- A nullable <ours> description
-
isPublic
public boolean isPublic()
<public> element set?- Returns:
true
if is set;false
otherwise.
-
setPublic
public void setPublic(boolean aPublic)
Sets the <public> element to specify public forums.- Parameters:
aPublic
-true
to include the <public> element;false
otherwise.
-
isSame
public boolean isSame()
<same> element set?- Returns:
true
if is set;false
otherwise.
-
setSame
public void setSame(boolean aSame)
Sets the <same> element to specify other entities following server practices.- Parameters:
aSame
-true
to include the <same> element;false
otherwise.
-
isUnrelated
public boolean isUnrelated()
<unrelated> element set?- Returns:
true
if is set;false
otherwise.
-
setUnrelated
public void setUnrelated(boolean aUnrelated)
Sets the <unrelated> element to specify Unrelated third parties.- Parameters:
aUnrelated
-true
to include the <unrelated> element;false
otherwise.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPRecipient
into a DOM element tree. The "recipient" element is created and the child nodes are appended as children.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document to create elements from- Returns:
- recipient root element tree.
- Throws:
EPPEncodeException
- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decodeEPPRecipient
from a DOM element tree. TheaElement
argument needs to be the <recipient> element- 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 a deepEPPRecipient
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRecipient
instance to compare with- Returns:
true
if equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRecipient
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRecipient
- 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
.
-
-