Interface BaseRatingExtensionContext
- All Superinterfaces:
ExtensionContext
- All Known Subinterfaces:
PostChargingExtensionContext
,PostRatingChargingExtensionContext
,PostRatingExtensionContext
,PreRatingExtensionContext
,RatingExtensionContext
Common context used for all Rating Extensions
-
Method Summary
Modifier and TypeMethodDescriptionsession IDgetApplicableProduct
(String productId, ZonedDateTime time) Gets the calling customer's balanceGets the calling customer's billing unitGets the calling customer instanceAPI to get a map of custom rated event fields which can be enriched by extensions.getEventZone
(String zoneMapName, String attributeName) Finds the zone result based on the origin, destination, product type and zone modelGets a PayloadMutator object which is used to modify the current values of the UsageRequest's payload.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.Map
<String, Collection<oracle.communication.brm.charging.util.misc.Pair<String, Collection<ExtensionRatingProfileValue>>>> Method to get the shared profile list.Returns the subscriber preferences.API to get the terminating or CALLED_TO customer information.API to get the terminating or CALLED_TO customer's product information.Returns an managed Map of RatingProfiles for terminating Customer with each profile identified by a String name.Returns an managed Map of RatingProfiles for terminating customer's Product with each profile identified by a String name.gets the UsageRequest associated with the rating extension context.boolean
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.boolean
{true}. if the original network usage request processing had a mid session CDR trigger condition met.void
setQuotaAttribute
(oracle.communication.brm.charging.rating.RatingConstants.QUOTA_ATTRIBUTES timerConfigurationName, UnitValue timerValue) void
setQuotaHoldingTime
(UnitValue quotaHoldingTimeInSeconds) void
setVolumeQuotaThreshold
(UnitValue volumeQuotaThreshold) boolean
triggerAbortSessionRequest
(String sessionId) Session ID to create a ASR service event.Methods inherited from interface oracle.communication.brm.charging.extensions.framework.ExtensionContext
getConfigurationBeanRepository, getExtensionsDataRepository, getLogger, getRequestOperationsList
-
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
-
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
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
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
-
setVolumeQuotaThreshold
- Parameters:
volumeQuotaThreshold
-
-
setQuotaHoldingTime
-
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.
-
getEventZone
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 analysisattributeName
- - 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 payloadExtensionException
-
triggerAbortSessionRequest
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
-