Package com.verisign.epp.codec.registry
Class EPPRegistryFields
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryFields
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryFields extends java.lang.Object implements EPPCodecComponent
Class that defines the management of related fields.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_TYPE
Required attribute type name that should have a value of eitherTYPE_SHARED
orTYPE_SYNC
.static java.lang.String
ELM_LOCALNAME
Constant for the phase local namestatic java.lang.String
ELM_NAME
Constant for the qualified name (prefix and local name)static java.lang.String
TYPE_SHARED
Constant for the related zone fields being shared, where there is one set of related fields.static java.lang.String
TYPE_SYNC
Constant for the related zone fields required to be synchronized by registry policy.
-
Constructor Summary
Constructors Constructor Description EPPRegistryFields()
Default constructor.EPPRegistryFields(java.lang.String aType, java.util.List<java.lang.String> aFields)
CreateEPPRegistryFields
instance with required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(java.lang.String aField)
Adds a field to the list of fields.java.lang.Object
clone()
CloneEPPRegistryFields
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryFields
element aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPRegistryFields
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryFields
compare.java.util.List<java.lang.String>
getFields()
Gets the related field names.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getType()
Gets the related fields type, which should be eitherTYPE_SHARED
orTYPE_SYNC
.void
setFields(java.util.List<java.lang.String> aFields)
Sets the related field names.void
setType(java.lang.String aType)
Sets the related fields type, which should be eitherTYPE_SHARED
orTYPE_SYNC
.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
TYPE_SHARED
public static final java.lang.String TYPE_SHARED
Constant for the related zone fields being shared, where there is one set of related fields. Updating a field in one related zone results in updating the field value across all of the related zones.- See Also:
- Constant Field Values
-
TYPE_SYNC
public static final java.lang.String TYPE_SYNC
Constant for the related zone fields required to be synchronized by registry policy. Updating a field in one related zone does not result in updating the field across all of the related zones.- See Also:
- Constant Field Values
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the phase local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the qualified name (prefix and local name)- See Also:
- Constant Field Values
-
ATTR_TYPE
public static final java.lang.String ATTR_TYPE
Required attribute type name that should have a value of eitherTYPE_SHARED
orTYPE_SYNC
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryFields
public EPPRegistryFields()
Default constructor. The type value MUST be set using thesetType(String)
method and the fields MUST be set usingsetFields(List)
oraddField(String)
.
-
EPPRegistryFields
public EPPRegistryFields(java.lang.String aType, java.util.List<java.lang.String> aFields)
CreateEPPRegistryFields
instance with required attributes.- Parameters:
aType
- Type of related fields with eitherTYPE_SHARED
orTYPE_SYNC
.aFields
- List of related fields.
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the related fields type, which should be eitherTYPE_SHARED
orTYPE_SYNC
.- Returns:
TYPE_SHARED
orTYPE_SYNC
if defined;null
otherwise.
-
setType
public void setType(java.lang.String aType)
Sets the related fields type, which should be eitherTYPE_SHARED
orTYPE_SYNC
.- Parameters:
aType
- the type, which should be eitherTYPE_SHARED
orTYPE_SYNC
-
getFields
public java.util.List<java.lang.String> getFields()
Gets the related field names.- Returns:
- List of related field names.
-
setFields
public void setFields(java.util.List<java.lang.String> aFields)
Sets the related field names.- Parameters:
aFields
- The list of related field names.
-
addField
public void addField(java.lang.String aField)
Adds a field to the list of fields.- Parameters:
aField
- Field to add to the list of fields.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryFields
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRegistryFields
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryFields
element aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- - Root DOM Element to decodeEPPRegistryFields
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryFields
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPRegistryFields
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryFields
instance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryFields
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryFields
instance to compare with- Returns:
true
if equal;false
otherwise
-
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
.
-
-