Package com.highdeal.pnr.hci
Class DefaultChargeActionModel
java.lang.Object
com.highdeal.pnr.hci.RateComponentModel
com.highdeal.pnr.hci.DefaultChargeActionModel
- All Implemented Interfaces:
XMLMarshallable,ContextualNode
- Direct Known Subclasses:
InternalChargeActionModel
This class represents the action of charging on the default one of the mapping following a charging mode.
This model is a rate RateComponentModel containing three properties:
- name="chargingMode" type="string" value="<
ChargingMode, the default one isChargingMode.forceNothing>" - name="allowFreeChargeUpTo" type="string" value="<
AccountState, the default one isAccountState.CLOSED>" - name="allowNotFreeChargeUpTo" type="string" value="<
AccountState, the default one isAccountState.ACTIVE>"
- Since:
- Transactive 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AccountStateDefault account state from which free amounts are not charged if its state is strictly higher than this value.static final AccountStateDefault account state from which non free amounts are not charged if its state is strictly higher than this value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.booleanReturns true if the component is valid.Gets the account state from which free charged amounts are rejected.Gets the account state from which non free charged amounts are rejected.Returns the mode of the charging.intGets the maximum child count.List<com.highdeal.pnr.hci.PropertyReference>Returns the list of the properties that are used in this component.voidinternalAddChild(String name, XMLMarshallable child) voidinternalMarshal(XMLOutputter output) voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAllowFreeChargeUpTo(AccountState allowFreeChargeUpTo) Sets the account state from which free charged amounts are rejected.voidsetAllowNotFreeChargeUpTo(AccountState allowNotFreeChargeUpTo) Sets the account state from which non free amounts charged are rejected.voidsetChargingMode(ChargingMode chargingMode) Sets the charging mode.Methods inherited from class com.highdeal.pnr.hci.RateComponentModel
addCharacterData, findRootRateModel, getChildAt, getChildCount, getChildren, getContext, getDescription, getName, getParent, getPropertyNames, inheritedContext, isRemoveChildAllowed, isSetChildAllowed, remove, removeChild, setAttributes, setChild, setChildren, setDescription, setName, setParent
-
Field Details
-
DEFAULT_FREE_CHARGE_UP_TO
Default account state from which free amounts are not charged if its state is strictly higher than this value. -
DEFAULT_NOT_FREE_CHARGE_UP_TO
Default account state from which non free amounts are not charged if its state is strictly higher than this value.
-
-
Constructor Details
-
DefaultChargeActionModel
public DefaultChargeActionModel()
-
-
Method Details
-
getChargingMode
Returns the mode of the charging.- Returns:
- the mode of the charging.
-
setChargingMode
Sets the charging mode.- Parameters:
chargingMode- the charging mode.
-
getAllowFreeChargeUpTo
Gets the account state from which free charged amounts are rejected.- Returns:
- an account state
-
setAllowFreeChargeUpTo
Sets the account state from which free charged amounts are rejected.- Parameters:
allowFreeChargeUpTo- an account state
-
getAllowNotFreeChargeUpTo
Gets the account state from which non free charged amounts are rejected.- Returns:
- an account state
-
setAllowNotFreeChargeUpTo
Sets the account state from which non free amounts charged are rejected.- Parameters:
allowNotFreeChargeUpTo- an account state
-
getMaxChildCount
public int getMaxChildCount()Description copied from class:RateComponentModelGets the maximum child count.- Specified by:
getMaxChildCountin classRateComponentModel- Returns:
- the maximum child count.
-
checkValidity
public boolean checkValidity()Description copied from class:RateComponentModelReturns true if the component is valid.- Specified by:
checkValidityin classRateComponentModel- Returns:
- true if the component is valid, false otherwise.
-
getPropertyReferences
Description copied from class:RateComponentModelReturns the list of the properties that are used in this component.- Specified by:
getPropertyReferencesin classRateComponentModel- Returns:
- the list of the properties that are used in this component
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Overrides:
addChildin classRateComponentModel- Parameters:
name- The name of tag for the childchild- The child to be added
-
internalAddChild
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Overrides:
marshalin classRateComponentModel- Parameters:
output- TheXML outputto marshal the object into
-
internalMarshal
-