Interface BaseRatingExtensionContext

All Superinterfaces:
ExtensionContext
All Known Subinterfaces:
PostChargingExtensionContext, PostRatingChargingExtensionContext, PostRatingExtensionContext, PreRatingExtensionContext, RatingExtensionContext

public interface BaseRatingExtensionContext extends ExtensionContext
Common context used for all Rating Extensions
  • Method Details

    • getUsageRequest

      UsageRequest getUsageRequest()
      gets the UsageRequest associated with the rating extension context.
      Returns:
      the UsageRequest object.
    • getCustomer

      ExtensionCustomer getCustomer()
      Gets the calling customer instance
      Returns:
      returns the calling customer instance
    • getProduct

      ExtensionProduct getProduct()
      Returns the current usage request product based on the supplied event time, its type and its well known identity at the time of event For example a Telephone number represents an external identity for a Product along with its type as VOICE.
      Returns:
      returns the current usage request product
    • getApplicableProduct

      ExtensionProduct getApplicableProduct(String productId, ZonedDateTime time)
    • getBalance

      ExtensionBalance getBalance()
      Gets the calling customer's balance
      Returns:
      returns the calling customer's balance
    • getBillingUnit

      ExtensionBillingUnit getBillingUnit()
      Gets the calling customer's billing unit
      Returns:
      returns the calling customer's billing unit
    • getTerminatingCustomerRatingProfiles

      Map<String,Collection<ExtensionRatingProfileValue>> getTerminatingCustomerRatingProfiles()
      Returns an managed Map of RatingProfiles for terminating Customer with each profile identified by a String name.
      Returns:
      Map of RatingProfiles with a String key representing the profile name.
      See Also:
    • getTerminatingProductRatingProfiles

      Map<String,Collection<ExtensionRatingProfileValue>> getTerminatingProductRatingProfiles()
      Returns an managed Map of RatingProfiles for terminating customer's Product with each profile identified by a String name.
      Returns:
      Map of RatingProfiles with a String key representing the profile name.
      See Also:
    • getSubscriberPreferences

      Map<String,String> getSubscriberPreferences()
      Returns the subscriber preferences. The product level subscriber preferences take precedence over the customer level preferences
      Returns:
      subscriber preferences
    • isMidSessionCdrConditionMet

      boolean isMidSessionCdrConditionMet()
      {true}. if the original network usage request processing had a mid session CDR trigger condition met. This flag helps providers differentiate between a network initiated TERMINATE and mid session CDR triggered TERMINATE and know if the mid session trigger condition was met or not.
      Returns:
      {true}. if the original network usage request processing had a mid session CDR trigger condition met.
    • getTerminatingCustomer

      ExtensionCustomer getTerminatingCustomer()
      API to get the terminating or CALLED_TO customer information.
      Returns:
      API to get the terminating or CALLED_TO customer information.
    • getTerminatingCustomerProduct

      ExtensionProduct getTerminatingCustomerProduct()
      API to get the terminating or CALLED_TO customer's product information. The product type to fetch for the terminating customer is based on the request product type.
      Returns:
      API to get the terminating or CALLED_TO customer's product information based on the request product type.
    • getCustomRatedEventFields

      Map<String,String> getCustomRatedEventFields()
      API to get a map of custom rated event fields which can be enriched by extensions. The map of custom rated events is shared by all the extensions within a 'TERMINATE' type of request processing but is not used for re-rating scenario. Any enriched custom rated event field in the map will be created within a ECE rated event. Downstream system consuming ECE rated events will be able to access these custom rated event fields.
      Returns:
      map of custom rated event fields.
    • getQuotaAttributes

      Map<String,UnitValue> getQuotaAttributes()
    • setVolumeQuotaThreshold

      void setVolumeQuotaThreshold(UnitValue volumeQuotaThreshold)
      Parameters:
      volumeQuotaThreshold -
    • setQuotaHoldingTime

      void setQuotaHoldingTime(UnitValue quotaHoldingTimeInSeconds)
    • setQuotaAttribute

      void setQuotaAttribute(oracle.communication.brm.charging.rating.RatingConstants.QUOTA_ATTRIBUTES timerConfigurationName, UnitValue timerValue) throws ExtensionException
      Throws:
      ExtensionException
    • isInConsumedRating

      boolean isInConsumedRating()
      Normal rating flow this value is {false}.If previously authorized quantity wasn't fully used by the network then consumed rating is performed and this value is {true} for those cases. e.g Let's say in an initiate/update request OCS authorizes GSU of 10 MB to network, on subsequent update it comes for re-authorization for another 10 MB RSU but with USU of 6 MB consumed instead of all the previous 10 MB granted. Then OCS will do consumed rating for USU of 6 MB to calculate the consumed reservation. In this consumed rating flow this value will be {true}.
    • getPayloadMutator

      PayloadMutator getPayloadMutator()
      Gets a PayloadMutator object which is used to modify the current values of the UsageRequest's payload.
      Returns:
      the mutator that facilitates for payload modifications.
    • getSharedProfiles

      Map<String,Collection<oracle.communication.brm.charging.util.misc.Pair<String,Collection<ExtensionRatingProfileValue>>>> getSharedProfiles()
      Method to get the shared profile list. This method returns all the profiles that are shared with the calling product and the calling customer.
      Returns:
      Collection containing profile name,label and the profile values. If no profiles found, will return null.
    • getEventZone

      String getEventZone(String zoneMapName, String attributeName) throws ExtensionException
      Finds the zone result based on the origin, destination, product type and zone model
      Parameters:
      zoneMapName - - name of the zone model to be used for analysis
      attributeName - - name of the payload attribute, which will be searched in the zonemodel
      Returns:
      zone result string
      Throws:
      oracle.communication.brm.charging.rating.RatingException - - throws RatingException if origin and destination values are not found in payload
      ExtensionException
    • triggerAbortSessionRequest

      boolean triggerAbortSessionRequest(String sessionId) throws ExtensionException
      Session ID to create a ASR service event.
      Parameters:
      sessionId - Session Id Which needs to be aborted.
      Returns:
      true if the session Id is set and not 5G Session
      Throws:
      ExtensionException
    • getAbortSessionRequestSessionId

      String getAbortSessionRequestSessionId()
      session ID
      Returns:
      Session Id