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 V8.13.0) specification:
     7.2.168 B   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.
    • 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 - if currentTariff is null.
      • 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 - if tariffTimeChange is null.
      • 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 - if nextTariff is null.
      • 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 - if avps is null.
      • removeExtensionAvps

        void removeExtensionAvps()
        Removes all extension AVPs from the Tariff-Information AVP. If no extension AVPs are present, this method returns silently.