Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeCommandData
- java.lang.Object
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeCommand
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeCommandData
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPFeeCommandData extends EPPFeeCommand
The command data included in a check response, that includes:
- command, customName, phase, subphase, and period from the base
EPPFeeCommand
- fees
- credits
- classification
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_STANDARD
OPTIONAL standard attribute name that specifies the standard command fee with a default value of "0".-
Fields inherited from class com.verisign.epp.codec.fee.v1_0.EPPFeeCommand
ATTR_CUSTOMNAME, ATTR_NAME, ATTR_PHASE, ATTR_SUBPHASE, ELM_LOCALNAME, ELM_NAME
-
-
Constructor Summary
Constructors Constructor Description EPPFeeCommandData()
Default constructor.EPPFeeCommandData(Command aCommand)
CreateEPPFeeCommand
instance with a defined command value.EPPFeeCommandData(Command aCommand, Phase aPhase)
CreateEPPFeeCommand
instance with a defined command and phase value.EPPFeeCommandData(Command aCommand, Phase aPhase, java.lang.String aSubPhase)
CreateEPPFeeCommand
instance with a defined command, phase, and sub-phase value.EPPFeeCommandData(Command aCommand, java.lang.String aCustomName)
CreateEPPFeeCommand
instance with a defined command value and custom name value.EPPFeeCommandData(Command aCommand, java.lang.String aCustomName, Phase aPhase, java.lang.String aSubPhase, boolean aStandard, EPPFeePeriod aPeriod, java.util.List<EPPFeeValue> aFees, java.util.List<EPPFeeCredit> aCredits, java.lang.String aReason, java.lang.String aLanguage)
CreateEPPFeeCommand
instance with all attributes.EPPFeeCommandData(EPPFeeCommand aCommand)
Instantiate instance by using an existingEPPFeeCommand
instance.EPPFeeCommandData(EPPFeeCommandData aCommand)
Instantiate instance by using an existingEPPFeeCommandData
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCredit(EPPFeeCredit aCredit)
Adds a credit to the list of credits.void
addFee(EPPFeeValue aFee)
Adds a fee to the list of fees.java.lang.Object
clone()
CloneEPPFeeCommand
instance.void
decode(org.w3c.dom.Element aElement)
Decode theEPPFeeCommand
element aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPFeeCommand
instance.boolean
equals(java.lang.Object aObject)
Implements a deepEPPFeeCommand
compare.java.util.List<EPPFeeCredit>
getCredits()
Gets the list of credits if defined.java.util.List<EPPFeeValue>
getFees()
Gets the list of fees if defined.java.lang.String
getLanguage()
Gets reason languagejava.lang.String
getReason()
Gets the reason value.boolean
hasCredits()
Are the credits defined?boolean
hasFees()
Are the fees defined?boolean
hasReason()
Is the reason defined if the available attribute isfalse
?boolean
isStandard()
Is the command a standard command?void
setCredits(java.util.List<EPPFeeCredit> aCredits)
Sets the list of credits.void
setFees(java.util.List<EPPFeeValue> aFees)
Sets the list of fees.void
setLanguage(java.lang.String aLanguage)
Sets language attribute.void
setReason(java.lang.String aReason)
Sets the reason value.void
setStandard(boolean aStandard)
Sets whether the command is a standard fee command.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.-
Methods inherited from class com.verisign.epp.codec.fee.v1_0.EPPFeeCommand
getCommand, getCustomName, getNamespace, getPeriod, getPhase, getSubPhase, hasCommand, hasCustomName, hasPeriod, hasPhase, hasSubPhase, setCommand, setCustomName, setPeriod, setPhase, setSubPhase
-
-
-
-
Field Detail
-
ATTR_STANDARD
public static final java.lang.String ATTR_STANDARD
OPTIONAL standard attribute name that specifies the standard command fee with a default value of "0".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPFeeCommandData
public EPPFeeCommandData()
Default constructor.
-
EPPFeeCommandData
public EPPFeeCommandData(EPPFeeCommand aCommand)
Instantiate instance by using an existingEPPFeeCommand
instance. This will clone theEPPFeeCommand
attributes.- Parameters:
aCommand
- instance to initialize theEPPFeeCommand
instance with.
-
EPPFeeCommandData
public EPPFeeCommandData(EPPFeeCommandData aCommand)
Instantiate instance by using an existingEPPFeeCommandData
instance. This is equivalent to cloning theEPPFeeCommandData
instance.- Parameters:
aCommand
- instance to initialize theEPPFeeCommandData
instance with.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand)
CreateEPPFeeCommand
instance with a defined command value.- Parameters:
aCommand
- Command value.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand, java.lang.String aCustomName)
CreateEPPFeeCommand
instance with a defined command value and custom name value.- Parameters:
aCommand
- Command value, which should beCommand.CUSTOM
.aCustomName
- Custom name of the command.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand, Phase aPhase)
CreateEPPFeeCommand
instance with a defined command and phase value.- Parameters:
aCommand
- Command value.aPhase
- Phase value.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand, Phase aPhase, java.lang.String aSubPhase)
CreateEPPFeeCommand
instance with a defined command, phase, and sub-phase value.- Parameters:
aCommand
- Command value.aPhase
- Phase value.aSubPhase
- Sub-phase value
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand, java.lang.String aCustomName, Phase aPhase, java.lang.String aSubPhase, boolean aStandard, EPPFeePeriod aPeriod, java.util.List<EPPFeeValue> aFees, java.util.List<EPPFeeCredit> aCredits, java.lang.String aReason, java.lang.String aLanguage)
CreateEPPFeeCommand
instance with all attributes.- Parameters:
aCommand
- Command value, which should beCommand.CUSTOM
.aCustomName
- Custom name of the command.aPhase
- Phase for command. Set tonull
for no phase.aSubPhase
- Sub-phase for command. Set tonull
for no sub-phase.aStandard
- Command used the standard fee.aPeriod
- Period for command. Set tonull
for no period.aFees
- Fees for command. Set tonull
for no fees.aCredits
- Credits for command. Set tonull
for no credits.aReason
- Reason that the fee information is not available for command. Set tonull
for no reason.aLanguage
- Language for reason with default of "en". Set tonull
to use default language.
-
-
Method Detail
-
hasFees
public boolean hasFees()
Are the fees defined?- Returns:
true
if the fees are defined;false
otherwise.
-
getFees
public java.util.List<EPPFeeValue> getFees()
Gets the list of fees if defined.- Returns:
- List of fees if defined; empty list otherwise.
-
addFee
public void addFee(EPPFeeValue aFee)
Adds a fee to the list of fees.- Parameters:
aFee
- The fee to add.
-
setFees
public void setFees(java.util.List<EPPFeeValue> aFees)
Sets the list of fees.- Parameters:
aFees
- The fees to set.
-
hasCredits
public boolean hasCredits()
Are the credits defined?- Returns:
true
if the credits are defined;false
otherwise.
-
getCredits
public java.util.List<EPPFeeCredit> getCredits()
Gets the list of credits if defined.- Returns:
- List of credits if defined; empty list otherwise.
-
addCredit
public void addCredit(EPPFeeCredit aCredit)
Adds a credit to the list of credits.- Parameters:
aCredit
- The credit to add.
-
setCredits
public void setCredits(java.util.List<EPPFeeCredit> aCredits)
Sets the list of credits.- Parameters:
aCredits
- The credits to set.
-
hasReason
public boolean hasReason()
Is the reason defined if the available attribute isfalse
?- Returns:
true
if the reason is defined;false
otherwise.
-
getReason
public java.lang.String getReason()
Gets the reason value.- Returns:
- Reason if defined;
null
otherwise.
-
setReason
public void setReason(java.lang.String aReason)
Sets the reason value.- Parameters:
aReason
- reason value
-
getLanguage
public java.lang.String getLanguage()
Gets reason language- Returns:
- Reason language
-
setLanguage
public void setLanguage(java.lang.String aLanguage)
Sets language attribute.- Parameters:
aLanguage
- Sets domain reason language attribute.
-
isStandard
public boolean isStandard()
Is the command a standard command?- Returns:
true
if it is a standard fee command;false
otherwise.
-
setStandard
public void setStandard(boolean aStandard)
Sets whether the command is a standard fee command.- Parameters:
aStandard
- Set totrue
if the fee is refundable,false
, ornull
if undefined.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPFeeCommand
instance.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classEPPFeeCommand
- Returns:
- clone of
EPPFeeCommand
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPFeeCommand
element aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Overrides:
decode
in classEPPFeeCommand
- Parameters:
aElement
- - Root DOM Element to decodeEPPFeeCommand
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 theEPPFeeCommand
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Overrides:
encode
in classEPPFeeCommand
- Parameters:
aDocument
- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPFeeCommand
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPFeeCommand
instance.
-
equals
public boolean equals(java.lang.Object aObject)
Implements a deepEPPFeeCommand
compare.- Overrides:
equals
in classEPPFeeCommand
- Parameters:
aObject
-EPPFeeCommand
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 classEPPFeeCommand
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
-