20 Exporting Billing Care Search Results

This chapter provides an overview on enabling exporting of Oracle Communications Billing Care accounts, events, and payments search results to PDF using the SDK.

About Billing Care Search

Billing Care provides search functionality for querying accounts, subscriber events, and payments. By default, Billing Care search results cannot be exported. Results are viewable only in the Billing Care application.

Enabling Search Results Export with the SDK

The SDK provides the ability to expose an embedded export link on Billing Care search results screens. Use the SDK to enable export links in the Billing Care search screens.

The Billing Care SDK includes sample search results export implementation in the SDK_HOME/BillingCare_SDK/samples/SaveSearchResults directory, where SDK_home is the directory where you installed the SDK. Use the samples as a guideline for enabling search results export.

To enable search results export to PDF in Billing Care:

  1. Create custom search templates with the element saveResults set to true to enable the Export link. See "Creating Custom Search Templates" for more information.

  2. Create custom search view models containing the savetoFile function. See "Creating Custom Search View Models" for more information.

  3. Create a customRegistry.js file configuring Billing Care to use the custom search view models created in step 2. See "Configuring Custom Search Modules in the Registry" for more information.

  4. Deploy your customizations to your application server. See "Deploying Customizations" for more information.

Creating Custom Search Templates

Each Billing Care search screen (accounts, events, and payments) uses a template that defines what information to display. By default, the saveResults element is set to false in each search template which hides the Export link. To enable the Export link in each search screen, you must create custom search templates for each search screen you want to enable export for in your NetBeans IDE project.

See "Customizing Billing Care Templates" for more information on customizing templates.

The SDK includes sample accounts, events, and payments search templates in SDK_home/BillingCare_SDK/samples/SaveSearchResults/src/java/custom where SDK_home is the Billing Care SDK installation directory. Use this sample as an example on how to configure Billing Care to enable only complete allocation of suspended payments.

To enable the search screen Export link Billing Care:

  1. Create custom template files for each search screen using the SDK samples in myproject/src/custom where myproject is the folder containing your NetBeans IDE project.

  2. In each search screen XML template file set the saveResults element to true.

  3. Save the file in your NetBeans IDE project.

Creating Custom Search View Models

Billing Care uses search view models to define search screen behavior. You must create custom accounts, events, and payments view models containing the savetoFile function to enable search results export to PDF.

See "About View Models" for more information about Billing Care view models.

The following sample view models in the SDK_home/BillingCare_SDK/samples/SaveSearchResults/web/js/viewmodels directory, where SDK_home is the Billing Care SDK installation directory, contain the savetoFile function required to enable search results export:

  • CustomEventsViewModel.js

  • CustomPaymentSuspenseSearchViewModel.js

  • CustomSearchViewModel.js

Use the sample view models to create your custom models.

To create a custom search view models with enabled Export links:

  1. Create the required custom search view model JavaScript files in myproject/web/custom/js/viewmodels/area/configure where myproject is the folder containing your NetBeans IDE project and area is the customization type (for example, search).

  2. Include the savetoFile function in your custom search view models.

  3. Save the file in your NetBeans IDE project.

Configuring Custom Search Modules in the Registry

After creating the required custom search view models, create custom module entries in the customRegistry.js file to use when using Billing Care search screens. Billing Care uses the custom search modules instead of the default entries when searching.

A sample customRegistry.js file is provided in the SDK_home/BillingCare_SDK/samples/SaveSearchResults/web/custom directory where SDK_home is the Billing Care SDK installation directory. This sample defines the custom search modules containing the search results export functionality.

To create custom search module entries in the customRegistry.js file:

  1. Create a customRegistry.js file in myproject/web/custom/ where myproject is the folder containing your NetBeans IDE project.

  2. Define the custom search modules in this file. Example 20-1 shows a definition of custom modules for accounts, events, and payments module in the registry using the SDK samples.

    Example 20-1 Sample Custom Search Modules Registry Entry

    var CustomRegistry = {
                    search: {
            viewmodel: 'viewmodels/CustomSearchViewModel'
        },   
                    events: {
            viewmodel: 'viewmodels/CustomEventsViewModel'
        },
                paymentSuspenseSearch: {
            viewModel: 'viewmodels/CustomPaymentSuspenseSearchViewModel'
        }
    };
    
  3. Save the file in your NetBeans IDE project.

Deploying Customizations

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