com.verisign.epp.codec.reseller
Class EPPResellerDisclose

java.lang.Object
  extended by com.verisign.epp.codec.reseller.EPPResellerDisclose
All Implemented Interfaces:
EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

public class EPPResellerDisclose
extends java.lang.Object
implements EPPCodecComponent

Represents a reseller disclose definition.

See Also:
Serialized Form

Nested Class Summary
static class EPPResellerDisclose.Type
          Localized type with one of the following values:
LOC - Localized form of data that MAY be represented in unrestricted UTF-8.
 
Field Summary
static java.lang.String ELM_LOCALNAME
          XML local name for EPPResellerDisclose.
static java.lang.String ELM_NAME
          XML root tag for EPPResellerContact.
 
Constructor Summary
EPPResellerDisclose()
          EPPResellerDisclose default constructor.
EPPResellerDisclose(boolean aFlag)
          EPPResellerDisclose that takes the required disclosure flag attribute.
 
Method Summary
 void addAddress(EPPResellerDisclose.Type aType)
          Adds an address element with the specific type to the list of addresses.
 void addName(EPPResellerDisclose.Type aType)
          Adds a name element with the specific type to the list of names.
 void addOrg(EPPResellerDisclose.Type aType)
          Adds an org element with the specific type to the list of orgs.
 java.lang.Object clone()
          Clone EPPResellerDisclose.
 void decode(org.w3c.dom.Element aElement)
          Decode the EPPResellerDisclose attributes from the aElement DOM Element tree.
 org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
          Encode a DOM Element tree from the attributes of the EPPResellerDisclose instance.
 boolean equals(java.lang.Object aObject)
          implements a deep EPPResellerDisclose compare.
 java.util.List<EPPResellerDisclose.Type> getAddresses()
          Gets disclose address types set.
 java.util.List<EPPResellerDisclose.Type> getNames()
          Gets disclose names types set.
 java.util.List<EPPResellerDisclose.Type> getOrgs()
          Gets disclose org types set.
 boolean hasAddresses()
          Are any addresses defined in the list of addresses?
 boolean hasNames()
          Are any names defined in the list of names?
 boolean hasOrgs()
          Are any orgs defined in the list of orgs?
 boolean isContact()
          Is the contact element included in the disclosure?
 boolean isEmail()
          Is the email element included in the disclosure?
 boolean isFax()
          Is the fax element included in the disclosure?
 boolean isFlag()
          Is the client preference to allow disclosure?
 boolean isUrl()
          Is the url element included in the disclosure?
 boolean isVoice()
          Will the voice element included in the disclosure?
 void setAddresses(java.util.List<EPPResellerDisclose.Type> aAddresses)
          Sets disclose address types.
 void setContact(boolean aContact)
          Sets the inclusion of the contact element in the disclosure.
 void setEmail(boolean aEmail)
          Sets the inclusion of the email element in the disclosure.
 void setFax(boolean aFax)
          Sets the inclusion of the fax element in the disclosure.
 void setFlag(boolean aFlag)
          Sets the client preference for disclosure.
 void setNames(java.util.List<EPPResellerDisclose.Type> aNames)
          Sets disclose name types.
 void setOrgs(java.util.List<EPPResellerDisclose.Type> aOrgs)
          Sets disclose org types.
 void setUrl(boolean aUrl)
          Sets the inclusion of the url element in the disclosure.
 void setVoice(boolean aVoice)
          Sets the inclusion of the voice element in the disclosure.
 java.lang.String toString()
          Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
protected  void validateState()
          Validate the state of the EPPResllerDisclose instance.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELM_LOCALNAME

public static final java.lang.String ELM_LOCALNAME
XML local name for EPPResellerDisclose.

See Also:
Constant Field Values

ELM_NAME

public static final java.lang.String ELM_NAME
XML root tag for EPPResellerContact.

See Also:
Constant Field Values
Constructor Detail

EPPResellerDisclose

public EPPResellerDisclose()
EPPResellerDisclose default constructor. Must call required setter methods before invoking encode(Document).


EPPResellerDisclose

public EPPResellerDisclose(boolean aFlag)
EPPResellerDisclose that takes the required disclosure flag attribute.

Parameters:
aFlag - true if the client preference is to allow disclosure; false otherwise to indicate that the client preference is to not allow disclosure.
Method Detail

hasNames

public boolean hasNames()
Are any names defined in the list of names?

Returns:
true if there is at least one name defined; false otherwise.

addName

public void addName(EPPResellerDisclose.Type aType)
Adds a name element with the specific type to the list of names.

Parameters:
aType - Type of name element to add to the list of names.

getNames

public java.util.List<EPPResellerDisclose.Type> getNames()
Gets disclose names types set.

Returns:
List of name Type values.

setNames

public void setNames(java.util.List<EPPResellerDisclose.Type> aNames)
Sets disclose name types.

Parameters:
aNames - List of name Type values.

hasOrgs

public boolean hasOrgs()
Are any orgs defined in the list of orgs?

Returns:
true if there is at least one org defined; false otherwise.

addOrg

public void addOrg(EPPResellerDisclose.Type aType)
Adds an org element with the specific type to the list of orgs.

Parameters:
aType - Type of org element to add to the list of orgs.

getOrgs

public java.util.List<EPPResellerDisclose.Type> getOrgs()
Gets disclose org types set.

Returns:
List of org Type values.

setOrgs

public void setOrgs(java.util.List<EPPResellerDisclose.Type> aOrgs)
Sets disclose org types.

Parameters:
aOrgs - List of org Type values.

hasAddresses

public boolean hasAddresses()
Are any addresses defined in the list of addresses?

Returns:
true if there is at least one address defined; false otherwise.

addAddress

public void addAddress(EPPResellerDisclose.Type aType)
Adds an address element with the specific type to the list of addresses.

Parameters:
aType - Type of address element to add to the list of addresses.

getAddresses

public java.util.List<EPPResellerDisclose.Type> getAddresses()
Gets disclose address types set.

Returns:
List of address Type values.

setAddresses

public void setAddresses(java.util.List<EPPResellerDisclose.Type> aAddresses)
Sets disclose address types.

Parameters:
aAddresses - List of address Type values.

isFlag

public boolean isFlag()
Is the client preference to allow disclosure?

Returns:
true if the client preference is to allow disclosure; false otherwise to indicate that the client preference is to not allow disclosure.

setFlag

public void setFlag(boolean aFlag)
Sets the client preference for disclosure.

Parameters:
aFlag - true if the client preference is to allow disclosure; false otherwise to indicate that the client preference is to not allow disclosure.

isVoice

public boolean isVoice()
Will the voice element included in the disclosure?

Returns:
true if the voice element is included in the disclosure; false otherwise.

setVoice

public void setVoice(boolean aVoice)
Sets the inclusion of the voice element in the disclosure.

Parameters:
aVoice - true to include the voice element in the disclosure; false otherwise.

isFax

public boolean isFax()
Is the fax element included in the disclosure?

Returns:
true if the fax element is included in the disclosure; false otherwise.

setFax

public void setFax(boolean aFax)
Sets the inclusion of the fax element in the disclosure.

Parameters:
aFax - true to include the fax element in the disclosure; false otherwise.

isEmail

public boolean isEmail()
Is the email element included in the disclosure?

Returns:
true if the email element is included in the disclosure; false otherwise.

setEmail

public void setEmail(boolean aEmail)
Sets the inclusion of the email element in the disclosure.

Parameters:
aEmail - true to include the email element in the disclosure; false otherwise.

isUrl

public boolean isUrl()
Is the url element included in the disclosure?

Returns:
true to include the url element in the disclosure; false otherwise.

setUrl

public void setUrl(boolean aUrl)
Sets the inclusion of the url element in the disclosure.

Parameters:
aUrl - true to include the url element in the disclosure; false otherwise.

isContact

public boolean isContact()
Is the contact element included in the disclosure?

Returns:
true to include the contact element in the disclosure; false otherwise.

setContact

public void setContact(boolean aContact)
Sets the inclusion of the contact element in the disclosure.

Parameters:
aContact - true to include the contact element in the disclosure; false otherwise.

encode

public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                           throws EPPEncodeException
Encode a DOM Element tree from the attributes of the EPPResellerDisclose instance.

Specified by:
encode in interface EPPCodecComponent
Parameters:
aDocument - DOM Document that is being built. Used as an Element factory.
Returns:
Root element associated with EPPResellerDisclose.
Throws:
EPPEncodeException - On error

decode

public void decode(org.w3c.dom.Element aElement)
            throws EPPDecodeException
Decode the EPPResellerDisclose attributes from the aElement DOM Element tree.

Specified by:
decode in interface EPPCodecComponent
Parameters:
aElement - Root DOM Element to decode EPPResellerDisclose from.
Throws:
EPPDecodeException - Unable to decode aElement

equals

public boolean equals(java.lang.Object aObject)
implements a deep EPPResellerDisclose compare.

Overrides:
equals in class java.lang.Object
Parameters:
aObject - EPPResellerDisclose instance to compare with
Returns:
true if this object is the same as the aObject argument; false otherwise

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone EPPResellerDisclose.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class java.lang.Object
Returns:
clone of EPPResellerDisclose
Throws:
java.lang.CloneNotSupportedException - standard Object.clone exception

toString

public java.lang.String toString()
Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

Overrides:
toString in class java.lang.Object
Returns:
Indented XML String if successful; ERROR otherwise.

validateState

protected void validateState()
                      throws EPPEncodeException
Validate the state of the EPPResllerDisclose instance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, the EPPCodecException will contain a description of the error. throws EPPCodecException State error. This will contain the name of the attribute that is not valid.

Throws:
EPPEncodeException - Error with the state


Copyright © VeriSign Inc. All Rights Reserved.