Interface TariffInformation
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface TariffInformation extends GroupedAvp
Defines an interface representing the Tariff-Information grouped AVP type. From the Diameter Rf Reference Point Protocol Details (3GPP TS 32.299 V10.0.0) specification:7.2.223 Tariff-Information AVP The Tariff-Information AVP (AVP code 2060) is of type Grouped and holds a tariff definition either from the local provider or from 3rd party provider. It contains information about the operator and the ID of the service being provided, the current tariff and possible next tariff after tariff switch time. It may also chain to tariffs provided by intermediate operators in the chain. It has the following ABNF grammar: Tariff-Information ::= < AVP Header: 2060 > { Current-Tariff } [ Tariff-Time-Change] [ Next-Tariff ]
Note:
The support for extension AVPs is present even thou the ABNF grammar for this AVP does not contain the "* [ AVP ]" line. Be aware that adding any extension AVPs may result in interoperability problems with products that strongly validate the incoming diameter message for it's adherence to the specification.
-
-
Field Summary
-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CurrentTariff
getCurrentTariff()
Returns the value of the Current-Tariff AVP, of type Grouped.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.NextTariff
getNextTariff()
Returns the value of the Next-Tariff AVP, of type Grouped.Date
getTariffTimeChange()
Returns the value of the Tariff-Time-Change AVP, of type Time.boolean
hasCurrentTariff()
Returns true if the Current-Tariff AVP is present in the Tariff-Information AVP.boolean
hasNextTariff()
Returns true if the Next-Tariff AVP is present in the Tariff-Information AVP.boolean
hasTariffTimeChange()
Returns true if the Tariff-Time-Change AVP is present in the Tariff-Information AVP.void
removeCurrentTariff()
Removes the Current-Tariff AVP from the Tariff-Information AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Tariff-Information AVP.void
removeNextTariff()
Removes the Next-Tariff AVP from the Tariff-Information AVP.void
removeTariffTimeChange()
Removes the Tariff-Time-Change AVP from the Tariff-Information AVP.void
setCurrentTariff(CurrentTariff currentTariff)
Sets the value of the Current-Tariff AVP, of type Grouped.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setNextTariff(NextTariff nextTariff)
Sets the value of the Next-Tariff AVP, of type Grouped.void
setTariffTimeChange(Date tariffTimeChange)
Sets the value of the Tariff-Time-Change AVP, of type Time.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
Method Detail
-
hasCurrentTariff
boolean hasCurrentTariff()
Returns true if the Current-Tariff AVP is present in the Tariff-Information AVP.
-
getCurrentTariff
CurrentTariff getCurrentTariff()
Returns the value of the Current-Tariff AVP, of type Grouped.- Returns:
- the value of the Current-Tariff AVP, or null if it has not been set.
-
setCurrentTariff
void setCurrentTariff(CurrentTariff currentTariff)
Sets the value of the Current-Tariff AVP, of type Grouped.- Throws:
NullPointerException
- ifcurrentTariff
isnull
.
-
removeCurrentTariff
void removeCurrentTariff()
Removes the Current-Tariff AVP from the Tariff-Information AVP. If the Current-Tariff AVP is not present, this method returns silently.
-
hasTariffTimeChange
boolean hasTariffTimeChange()
Returns true if the Tariff-Time-Change AVP is present in the Tariff-Information AVP.
-
getTariffTimeChange
Date getTariffTimeChange()
Returns the value of the Tariff-Time-Change AVP, of type Time.- Returns:
- the value of the Tariff-Time-Change AVP, or null if it has not been set.
-
setTariffTimeChange
void setTariffTimeChange(Date tariffTimeChange)
Sets the value of the Tariff-Time-Change AVP, of type Time.- Throws:
NullPointerException
- iftariffTimeChange
isnull
.
-
removeTariffTimeChange
void removeTariffTimeChange()
Removes the Tariff-Time-Change AVP from the Tariff-Information AVP. If the Tariff-Time-Change AVP is not present, this method returns silently.
-
hasNextTariff
boolean hasNextTariff()
Returns true if the Next-Tariff AVP is present in the Tariff-Information AVP.
-
getNextTariff
NextTariff getNextTariff()
Returns the value of the Next-Tariff AVP, of type Grouped.- Returns:
- the value of the Next-Tariff AVP, or null if it has not been set.
-
setNextTariff
void setNextTariff(NextTariff nextTariff)
Sets the value of the Next-Tariff AVP, of type Grouped.- Throws:
NullPointerException
- ifnextTariff
isnull
.
-
removeNextTariff
void removeNextTariff()
Removes the Next-Tariff AVP from the Tariff-Information AVP. If the Next-Tariff AVP is not present, this method returns silently.
-
getExtensionAvps
DiameterAvp[] getExtensionAvps()
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Tariff-Information AVP. A return value of null implies that no extensions AVPs have been set.
-
setExtensionAvps
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Tariff-Information AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)NullPointerException
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Tariff-Information AVP. If no extension AVPs are present, this method returns silently.
-
-