30 Filtering Bundles Available for Purchase

This chapter describes how to customize Oracle Communications Billing Care to filter the bundles displayed in the Purchase Catalogue screen.

About Filtering Bundles

In BRM, the PCM_OP_CUST_POL_GET_DEALS opcode enables you to retrieve a customized list of bundles from the BRM database for customer purchase. Similarly, you can retrieve the bundles from the BRM database and filter the list of bundles available for purchase in Billing Care by using the Billing Care SDK. For example, you can customize Billing Care to display only the manually added discount bundles in the bundles list.

Filtering Bundles List in Billing Care

To filter the bundles list in Billing Care:

  1. Create a custom template model to override the default subscription flow. See "Creating CustomPCMSubscriptionModule.java Class" for more information.

  2. Create a custom template worker class to add custom logic to the subscription flow. See "Creating CustomSubscriptionWorker.java Class" for more information.

  3. Add your customization files to your NetBeans IDE project. See "Updating the customModule.properties File" for more information.

  4. Deploy your customizations using one of the methods described in "Using an Exploded Archive during Customization" or "Packaging and Deploying Customizations".

Creating CustomPCMSubscriptionModule.java Class

Create a custom subscription module class, CustomPCMSubscriptionModule.java, and override the getBundles( ) method.

To create the CustomPCMSubscriptionModule.java class:

  1. Create the CustomPCMSubscriptionModule.java class file in myproject/projectname/src/java/com/rest/sdk, where myproject is the folder containing your NetBeans IDE project and projectname is the name of your custom project.

  2. Override the getBundles( ) method in the CustomPCMSubscriptionModule.java class file as shown in this example:

    @Override    public BundleList getBundles(String id, String expand) { 
              //method code 
      } 
    
  3. Save the file in your NetBeans IDE project.

Creating CustomSubscriptionWorker.java Class

Create a custom template worker class containing logic to retrieve and filter the bundles available for purchase.

To create the CustomSubscriptionWorker.java class:

  1. Create the CustomSubscriptionWorker.java class file in myproject/projectname/src/java/com/rest/sdk.

  2. Override the following methods as appropriate:

    • convertToInputFListToGetBundleList( ). This method takes the service type as input and returns the input flist. For example, you can pass "0.0.0.1+-service-email+62503" as an input to retrieve only the bundles that are associated with the service type, email.

    • invokeOpcodeToGetBundleList( ). This method takes the flist returned by the convertToInputFListToGetBundleList( ) method as input and triggers the PCM_OP_CUST_POL_GET_DEALS opcode to return the output flist.

    • convertToOutputFListToGetBundleList( ). This method takes the flist returned by the invokeOpcodeToGetBundleList( ) method and a flag that indicates whether charge or discount offers to be retrieved as input and returns the list of bundles associated with the service type.

  3. Save the file in your NetBeans IDE project.

Updating the customModule.properties File

Create or update the custom module property file to override the default subscription module logic with your customizations.

To update the custom module property file:

  1. Open the customModule.properties file in myproject/projectname/src/java/custom.

  2. Add the following entry:

    billingcare.rest.subscription.module=com.rest.sdk.CustomPCMSubscriptionModule
    
  3. Save the file in your NetBeans IDE project.