Class SampleCustomDslExtension
java.lang.Object
oracle.communication.brm.charging.sdk.extensions.SampleCustomDslExtension
- All Implemented Interfaces:
oracle.communication.brm.charging.dsl.CustomDslExtension
public class SampleCustomDslExtension
extends Object
implements oracle.communication.brm.charging.dsl.CustomDslExtension
Example custom DSL extension which will be used for evaluating Selectors.
-
Field Summary
Fields inherited from interface oracle.communication.brm.charging.dsl.CustomDslExtension
registeredClasses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoracle.communication.brm.charging.dsl.runtime.Result
void
Initialization for extension which will initialise access to the extension repository where selectors will be configured.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface oracle.communication.brm.charging.dsl.CustomDslExtension
getRegisteredClasses, registerClass
-
Constructor Details
-
SampleCustomDslExtension
public SampleCustomDslExtension()
-
-
Method Details
-
initialize
public void initialize()Initialization for extension which will initialise access to the extension repository where selectors will be configured. Note that we need to do the messing around with intialization synchronization due to two issues: 1. The initialization method can be called multiple times during a node startup. 2. The retrieval of the Extensions cache template would recursively trigger this logic, so we need to avoid synchronizing in a recursive call to avoid deadlock. The approach below satisfies both these problems, although should be considered a workaround for now.- Specified by:
initialize
in interfaceoracle.communication.brm.charging.dsl.CustomDslExtension
-
execute
public oracle.communication.brm.charging.dsl.runtime.Result execute(oracle.communication.brm.charging.dsl.runtime.Input input, String id, String type) - Specified by:
execute
in interfaceoracle.communication.brm.charging.dsl.CustomDslExtension
- Parameters:
input
- the rating contextid
- the internal id (internal pricing ID for charge selector or alteration selector)type
- type is CHARGE if called from a Charge RPS and ALTERATION if called from a Alteration RPS- Returns:
- result - the value of the evaluation (the internal Id of the rate-plan) or null if no match.
-