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.StringATTR_STANDARDOPTIONAL 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)CreateEPPFeeCommandinstance with a defined command value.EPPFeeCommandData(Command aCommand, Phase aPhase)CreateEPPFeeCommandinstance with a defined command and phase value.EPPFeeCommandData(Command aCommand, Phase aPhase, java.lang.String aSubPhase)CreateEPPFeeCommandinstance with a defined command, phase, and sub-phase value.EPPFeeCommandData(Command aCommand, java.lang.String aCustomName)CreateEPPFeeCommandinstance 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)CreateEPPFeeCommandinstance with all attributes.EPPFeeCommandData(EPPFeeCommand aCommand)Instantiate instance by using an existingEPPFeeCommandinstance.EPPFeeCommandData(EPPFeeCommandData aCommand)Instantiate instance by using an existingEPPFeeCommandDatainstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCredit(EPPFeeCredit aCredit)Adds a credit to the list of credits.voidaddFee(EPPFeeValue aFee)Adds a fee to the list of fees.java.lang.Objectclone()CloneEPPFeeCommandinstance.voiddecode(org.w3c.dom.Element aElement)Decode theEPPFeeCommandelement aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPFeeCommandinstance.booleanequals(java.lang.Object aObject)Implements a deepEPPFeeCommandcompare.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.StringgetLanguage()Gets reason languagejava.lang.StringgetReason()Gets the reason value.booleanhasCredits()Are the credits defined?booleanhasFees()Are the fees defined?booleanhasReason()Is the reason defined if the available attribute isfalse?booleanisStandard()Is the command a standard command?voidsetCredits(java.util.List<EPPFeeCredit> aCredits)Sets the list of credits.voidsetFees(java.util.List<EPPFeeValue> aFees)Sets the list of fees.voidsetLanguage(java.lang.String aLanguage)Sets language attribute.voidsetReason(java.lang.String aReason)Sets the reason value.voidsetStandard(boolean aStandard)Sets whether the command is a standard fee command.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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 existingEPPFeeCommandinstance. This will clone theEPPFeeCommandattributes.- Parameters:
aCommand- instance to initialize theEPPFeeCommandinstance with.
-
EPPFeeCommandData
public EPPFeeCommandData(EPPFeeCommandData aCommand)
Instantiate instance by using an existingEPPFeeCommandDatainstance. This is equivalent to cloning theEPPFeeCommandDatainstance.- Parameters:
aCommand- instance to initialize theEPPFeeCommandDatainstance with.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand)
CreateEPPFeeCommandinstance with a defined command value.- Parameters:
aCommand- Command value.
-
EPPFeeCommandData
public EPPFeeCommandData(Command aCommand, java.lang.String aCustomName)
CreateEPPFeeCommandinstance 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)
CreateEPPFeeCommandinstance 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)
CreateEPPFeeCommandinstance 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)
CreateEPPFeeCommandinstance with all attributes.- Parameters:
aCommand- Command value, which should beCommand.CUSTOM.aCustomName- Custom name of the command.aPhase- Phase for command. Set tonullfor no phase.aSubPhase- Sub-phase for command. Set tonullfor no sub-phase.aStandard- Command used the standard fee.aPeriod- Period for command. Set tonullfor no period.aFees- Fees for command. Set tonullfor no fees.aCredits- Credits for command. Set tonullfor no credits.aReason- Reason that the fee information is not available for command. Set tonullfor no reason.aLanguage- Language for reason with default of "en". Set tonullto use default language.
-
-
Method Detail
-
hasFees
public boolean hasFees()
Are the fees defined?- Returns:
trueif the fees are defined;falseotherwise.
-
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:
trueif the credits are defined;falseotherwise.
-
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:
trueif the reason is defined;falseotherwise.
-
getReason
public java.lang.String getReason()
Gets the reason value.- Returns:
- Reason if defined;
nullotherwise.
-
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:
trueif it is a standard fee command;falseotherwise.
-
setStandard
public void setStandard(boolean aStandard)
Sets whether the command is a standard fee command.- Parameters:
aStandard- Set totrueif the fee is refundable,false, ornullif undefined.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPFeeCommandinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPFeeCommand- Returns:
- clone of
EPPFeeCommand - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPFeeCommandelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Overrides:
decodein classEPPFeeCommand- Parameters:
aElement- - Root DOM Element to decodeEPPFeeCommandfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPFeeCommandinstance.- Specified by:
encodein interfaceEPPCodecComponent- Overrides:
encodein classEPPFeeCommand- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPFeeCommandinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPFeeCommandinstance.
-
equals
public boolean equals(java.lang.Object aObject)
Implements a deepEPPFeeCommandcompare.- Overrides:
equalsin classEPPFeeCommand- Parameters:
aObject-EPPFeeCommandinstance to compare with- Returns:
trueif equal;falseotherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPFeeCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
-