|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.diameter.charging.util.CostInformation
public class CostInformation
CostInformation is a lightweight representation of the Grouped [Cost-Information] Avp.
The [Cost-Information] Avp is defined in RFC 4006 - Diameter Credit-Control Application.
Constructor Summary | |
---|---|
CostInformation()
Constructs an empty CostInformation object representing the [Cost-Information] Avp. |
|
CostInformation(java.util.List<Avp> avps)
Constructs an CostInformation object representing the Grouped [Cost-Information] Avp. |
Method Summary | |
---|---|
java.lang.String |
getCostUnit()
Gets the value corresponding to the payload of the [Cost-Unit] Avp. |
java.lang.Integer |
getCurrencyCode()
Gets the value corresponding to the payload of the {Currency-Code} Avp. |
UnitValue |
getUnitValue()
Gets the value corresponding to the payload of the {Unit-Value} Avp. |
void |
setCostUnit(java.lang.String costUnit)
Sets the value corresponding to the payload of the [Cost-Unit] Avp. |
void |
setCurrencyCode(java.lang.Integer currencyCode)
Sets the value corresponding to the payload of the {Currency-Code} Avp. |
void |
setUnitValue(UnitValue unitValue)
Sets the value corresponding to the payload of the {Unit-Value} Avp. |
Avp |
toAvp()
Transforms an CostInformation object into a Grouped [Cost-Information] Avp. |
void |
validate()
Validates the members of the CostInformation object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CostInformation()
public CostInformation(java.util.List<Avp> avps) throws AvpTransformationException
The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of CostInformation, the member will be populated with the Avp value during construction. If an Avp code is unknown, the value will be silently discarded.
avps
- a list of Avps that can appear in the Grouped
[Cost-Information] Avp.
AvpTransformationException
- if the Avp value is in an unexpected format.Method Detail |
---|
public java.lang.String getCostUnit()
public void setCostUnit(java.lang.String costUnit)
costUnit
- the value corresponding to the payload of the [Cost-Unit] Avp.public java.lang.Integer getCurrencyCode()
public void setCurrencyCode(java.lang.Integer currencyCode)
currencyCode
- the value corresponding to the payload of the {Currency-Code} Avp.public UnitValue getUnitValue()
public void setUnitValue(UnitValue unitValue)
unitValue
- the value corresponding to the payload of the {Unit-Value} Avp.public void validate() throws ChargingValidationException
ChargingValidationException
- if a member of CostInformation is in an unexpected format.public Avp toAvp() throws AvpTransformationException
All non-null members of CostInformation will be transformed into Avps nested inside of the [Cost-Information] Avp.
AvpTransformationException
- if a member of CostInformation is in an
unexpected format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |