public class DefaultChargeActionModel extends RateComponentModel
This model is a rate RateComponentModel containing three properties:
ChargingMode, the default one is ChargingMode.forceNothing>"AccountState, the default one is AccountState.CLOSED>"AccountState, the default one is AccountState.ACTIVE>"| Modifier and Type | Field and Description |
|---|---|
static AccountState |
DEFAULT_FREE_CHARGE_UP_TO
Default account state from which free amounts are not charged if its state is strictly higher than this value.
|
static AccountState |
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 and Description |
|---|
DefaultChargeActionModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(java.lang.String name,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
boolean |
checkValidity()
Returns true if the component is valid.
|
AccountState |
getAllowFreeChargeUpTo()
Gets the account state from which free charged amounts are rejected.
|
AccountState |
getAllowNotFreeChargeUpTo()
Gets the account state from which non free charged amounts are rejected.
|
ChargingMode |
getChargingMode()
Returns the mode of the charging.
|
int |
getMaxChildCount()
Gets the maximum child count.
|
java.util.List<com.highdeal.pnr.hci.PropertyReference> |
getPropertyReferences()
Returns the list of the properties that are used in this component.
|
void |
internalAddChild(java.lang.String name,
XMLMarshallable child) |
void |
internalMarshal(XMLOutputter output) |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAllowFreeChargeUpTo(AccountState allowFreeChargeUpTo)
Sets the account state from which free charged amounts are rejected.
|
void |
setAllowNotFreeChargeUpTo(AccountState allowNotFreeChargeUpTo)
Sets the account state from which non free amounts charged are rejected.
|
void |
setChargingMode(ChargingMode chargingMode)
Sets the charging mode.
|
addCharacterData, findRootRateModel, getChildAt, getChildCount, getChildren, getContext, getDescription, getName, getParent, getPropertyNames, inheritedContext, isRemoveChildAllowed, isSetChildAllowed, remove, removeChild, setAttributes, setChild, setChildren, setDescription, setName, setParentpublic static final AccountState DEFAULT_FREE_CHARGE_UP_TO
public static final AccountState DEFAULT_NOT_FREE_CHARGE_UP_TO
public ChargingMode getChargingMode()
public void setChargingMode(ChargingMode chargingMode)
chargingMode - the charging mode.public AccountState getAllowFreeChargeUpTo()
public void setAllowFreeChargeUpTo(AccountState allowFreeChargeUpTo)
allowFreeChargeUpTo - an account statepublic AccountState getAllowNotFreeChargeUpTo()
public void setAllowNotFreeChargeUpTo(AccountState allowNotFreeChargeUpTo)
allowNotFreeChargeUpTo - an account statepublic int getMaxChildCount()
RateComponentModelgetMaxChildCount in class RateComponentModelpublic boolean checkValidity()
RateComponentModelcheckValidity in class RateComponentModelpublic java.util.List<com.highdeal.pnr.hci.PropertyReference> getPropertyReferences()
RateComponentModelgetPropertyReferences in class RateComponentModelpublic void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallableaddChild in class RateComponentModelname - The name of tag for the childchild - The child to be addedpublic void internalAddChild(java.lang.String name,
XMLMarshallable child)
public void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallablemarshal in class RateComponentModeloutput - The XML output to marshal the object intopublic void internalMarshal(XMLOutputter output)