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,Serializable,Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOPTIONAL 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
ConstructorsConstructorDescriptionDefault 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, String aSubPhase) CreateEPPFeeCommandinstance with a defined command, phase, and sub-phase value.EPPFeeCommandData(Command aCommand, String aCustomName) CreateEPPFeeCommandinstance with a defined command value and custom name value.EPPFeeCommandData(Command aCommand, String aCustomName, Phase aPhase, String aSubPhase, boolean aStandard, EPPFeePeriod aPeriod, List<EPPFeeValue> aFees, List<EPPFeeCredit> aCredits, String aReason, 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
Modifier and TypeMethodDescriptionvoidaddCredit(EPPFeeCredit aCredit) Adds a credit to the list of credits.voidaddFee(EPPFeeValue aFee) Adds a fee to the list of fees.clone()CloneEPPFeeCommandinstance.voidDecode theEPPFeeCommandelement aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPFeeCommandinstance.booleanImplements a deepEPPFeeCommandcompare.Gets the list of credits if defined.getFees()Gets the list of fees if defined.Gets reason languageGets the reason value.booleanAre the credits defined?booleanhasFees()Are the fees defined?booleanIs the reason defined if the available attribute isfalse?booleanIs the command a standard command?voidsetCredits(List<EPPFeeCredit> aCredits) Sets the list of credits.voidsetFees(List<EPPFeeValue> aFees) Sets the list of fees.voidsetLanguage(String aLanguage) Sets language attribute.voidSets the reason value.voidsetStandard(boolean aStandard) Sets whether the command is a standard fee command.toString()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 Details
-
ATTR_STANDARD
OPTIONAL standard attribute name that specifies the standard command fee with a default value of "0".- See Also:
-
-
Constructor Details
-
EPPFeeCommandData
public EPPFeeCommandData()Default constructor. -
EPPFeeCommandData
Instantiate instance by using an existingEPPFeeCommandinstance. This will clone theEPPFeeCommandattributes.- Parameters:
aCommand- instance to initialize theEPPFeeCommandinstance with.
-
EPPFeeCommandData
Instantiate instance by using an existingEPPFeeCommandDatainstance. This is equivalent to cloning theEPPFeeCommandDatainstance.- Parameters:
aCommand- instance to initialize theEPPFeeCommandDatainstance with.
-
EPPFeeCommandData
CreateEPPFeeCommandinstance with a defined command value.- Parameters:
aCommand- Command value.
-
EPPFeeCommandData
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
CreateEPPFeeCommandinstance with a defined command and phase value.- Parameters:
aCommand- Command value.aPhase- Phase value.
-
EPPFeeCommandData
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, String aCustomName, Phase aPhase, String aSubPhase, boolean aStandard, EPPFeePeriod aPeriod, List<EPPFeeValue> aFees, List<EPPFeeCredit> aCredits, String aReason, 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 Details
-
hasFees
public boolean hasFees()Are the fees defined?- Returns:
trueif the fees are defined;falseotherwise.
-
getFees
Gets the list of fees if defined.- Returns:
- List of fees if defined; empty list otherwise.
-
addFee
Adds a fee to the list of fees.- Parameters:
aFee- The fee to add.
-
setFees
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
Gets the list of credits if defined.- Returns:
- List of credits if defined; empty list otherwise.
-
addCredit
Adds a credit to the list of credits.- Parameters:
aCredit- The credit to add.
-
setCredits
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
Gets the reason value.- Returns:
- Reason if defined;
nullotherwise.
-
setReason
Sets the reason value.- Parameters:
aReason- reason value
-
getLanguage
Gets reason language- Returns:
- Reason language
-
setLanguage
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
CloneEPPFeeCommandinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPFeeCommand- Returns:
- clone of
EPPFeeCommand - Throws:
CloneNotSupportedException- standard Object.clone exception
-
decode
Decode 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
Encode 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
Implements a deepEPPFeeCommandcompare.- Overrides:
equalsin classEPPFeeCommand- Parameters:
aObject-EPPFeeCommandinstance to compare with- Returns:
trueif equal;falseotherwise
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPFeeCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-