Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeCheck
- java.lang.Object
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeCheck
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPFeeCheck extends java.lang.Object implements EPPCodecComponent
Fee Check Extension that enables a client to pass a command along with optionally the currency, period, and fee class to apply to the objects in the check command.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPFeeCheck
.static java.lang.String
ELM_NAME
XML root tag forEPPFeeCheck
.
-
Constructor Summary
Constructors Constructor Description EPPFeeCheck()
Default constructor forEPPFeeCheck
.EPPFeeCheck(EPPFeeCommand aCommand)
Constructor forEPPFeeCheck
that takes a single command.EPPFeeCheck(EPPFeeCommand aCommand, java.lang.String aCurrency)
Constructor forEPPFeeCheck
that takes a single command attribute and the optional currency.EPPFeeCheck(java.util.List<EPPFeeCommand> aCommands)
Constructor forEPPFeeCheck
that takes a list of commands.EPPFeeCheck(java.util.List<EPPFeeCommand> aCommands, java.lang.String aCurrency)
Constructor forEPPFeeCheck
that takes a list of commands attribute and the optional currency.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCommand(EPPFeeCommand aCommand)
Adds a command to the list of commands.java.lang.Object
clone()
Clone anEPPCodecComponent
instance.void
decode(org.w3c.dom.Element aElement)
Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode instance into a DOM element tree.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPFeeCheck
with this instance.java.util.List<EPPFeeCommand>
getCommands()
Gets the list of commands if defined.java.lang.String
getCurrency()
Gets the currency value.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
hasCommands()
Are the commands defined?boolean
hasCurrency()
Is the currency defined?void
setCommands(java.util.List<EPPFeeCommand> aCommands)
Sets the list of commands.void
setCurrency(java.lang.String aCurrency)
Sets the currency value.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPFeeCheck
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPFeeCheck
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPFeeCheck
public EPPFeeCheck()
Default constructor forEPPFeeCheck
.
-
EPPFeeCheck
public EPPFeeCheck(EPPFeeCommand aCommand)
Constructor forEPPFeeCheck
that takes a single command.- Parameters:
aCommand
- Command to check
-
EPPFeeCheck
public EPPFeeCheck(java.util.List<EPPFeeCommand> aCommands)
Constructor forEPPFeeCheck
that takes a list of commands.- Parameters:
aCommands
- List of commands to check
-
EPPFeeCheck
public EPPFeeCheck(EPPFeeCommand aCommand, java.lang.String aCurrency)
Constructor forEPPFeeCheck
that takes a single command attribute and the optional currency.- Parameters:
aCommand
- Command to checkaCurrency
- OPTIONAL desired currency to return
-
EPPFeeCheck
public EPPFeeCheck(java.util.List<EPPFeeCommand> aCommands, java.lang.String aCurrency)
Constructor forEPPFeeCheck
that takes a list of commands attribute and the optional currency.- Parameters:
aCommands
- List of commands to checkaCurrency
- OPTIONAL desired currency to return
-
-
Method Detail
-
hasCommands
public boolean hasCommands()
Are the commands defined?- Returns:
true
if the commands are defined;false
otherwise.
-
getCommands
public java.util.List<EPPFeeCommand> getCommands()
Gets the list of commands if defined.- Returns:
- List of commands if defined; empty list otherwise.
-
addCommand
public void addCommand(EPPFeeCommand aCommand)
Adds a command to the list of commands.- Parameters:
aCommand
- The command to add.
-
setCommands
public void setCommands(java.util.List<EPPFeeCommand> aCommands)
Sets the list of commands.- Parameters:
aCommands
- The commands to set.
-
hasCurrency
public boolean hasCurrency()
Is the currency defined?- Returns:
true
if the currency is defined;false
otherwise.
-
getCurrency
public java.lang.String getCurrency()
Gets the currency value.- Returns:
- Currency if defined;
null
otherwise.
-
setCurrency
public void setCurrency(java.lang.String aCurrency)
Sets the currency value.- Parameters:
aCurrency
- Currency value
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException
- Error encodingEPPFeeCheck
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Clone anEPPCodecComponent
instance.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of concrete
EPPFeeCheck
- 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.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPFeeCheck
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
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
.
-
-