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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    oracle.communication.brm.charging.dsl.runtime.Result
    execute(oracle.communication.brm.charging.dsl.runtime.Input input, String id, String type)
     
    oracle.communication.brm.charging.dsl.runtime.Result
    execute(oracle.communication.brm.charging.dsl.runtime.Input input, String id, String type, boolean getAll)
     
    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 interface oracle.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 interface oracle.communication.brm.charging.dsl.CustomDslExtension
      Parameters:
      input - the rating context
      id - the internal selector id
      type - selector type such as CHARGE, ALTERATION, USC, or APN
      Returns:
      selector result payload, or null when control should fall back to the OOB selector path
    • execute

      public oracle.communication.brm.charging.dsl.runtime.Result execute(oracle.communication.brm.charging.dsl.runtime.Input input, String id, String type, boolean getAll)
      Specified by:
      execute in interface oracle.communication.brm.charging.dsl.CustomDslExtension
      Parameters:
      input - the rating context
      id - the internal selector id
      type - selector type such as CHARGE, ALTERATION, USC, or APN
      getAll - if true, all selector results are returned in selector order; if false, selector evaluation stops after the first match and returns a list containing at most one result
      Returns:
      selector result payload consumed by rating selector evaluation