This chapter explains how to add custom search templates to Oracle Communications Billing and Revenue Management (BRM) Event Browser.
A search template is an Event Browser component that you use to find events. Each template contains a group of related fields for one or more related classes. These fields define the results expected from the search and how the results are displayed in the results table. The templates are passed to the search bean in a Java Properties class.
The Event Browser search tool contains a default set of search templates. You can enhance the search capability by creating custom templates.
You can create search templates that perform complex searches on up to four classes. Each search template can find multiple event types and define multiple search conditions. You can define which classes to search, and you can specify which fields from the first class are displayed in the results table.
Each custom search template you create appears on the list of templates in the Search dialog box. You can also optionally add custom templates to the list of templates on the Browse menu.
You define custom search templates by using the specified syntax, in a file that you create with a specific name and save in a specific location.
To create custom search templates:
Create a text file.
In this file, you do the following:
Define as many templates as you need, as described in "Template Definition".
Optionally include entries that make the custom templates appear on the Browse menu, as described in "Browse Menu Definition".
Save the file with this file name:
EventBrowserSearch.templates
Save the file in this folder:
Program Files\Portal Software\CustomerCenter\lib
A template definition in the EventBrowserSearch.templates file consists of several lines of text. Each line contains key/value pair properties that define:
The template name.
The classes to search.
The results to search for.
The labels to display in the Search dialog box.
The column labels for the results table.
Each property that you define in your template uses the following basic syntax:
search.template.templateName.property=value
where:
search.template identifies the beginning of an entry.
templateName is the unique name that identifies the template.
property is the key you are defining, for example, a class to search or a label to apply.
value is the value you assign to the property, such as the template name and the class name.
For a list of the available search template entries and their syntax, see "Search Template Properties".
Table 30-1 shows the simple template named Testing, which searches the event and account classes for the account number and event description:
Table 30-1 Annotated Example Template
Property and Value | Meaning |
---|---|
search.template.test.name=Testing |
The name of the template is Testing. |
search.template.test.class.1=/event search.template.test.class.2=/account |
The classes that will be searched are the event and account classes, numbered 1 and 2 for reference. |
search.template.text.results= R1:1.FldSysDescr,R2:2.FldAccountObj.FldAccountNo |
From class 1 (event), get the field description. From class 2 (account), get the account number, which is found in the FldAccountObj. |
search.template.test.V1.label=Description search.template.test.V2.label=Account Object |
In the Search dialog box, label the fields Description and Account Object. |
search.template.test.R1.label=Desc search template.test.R2.label=AcctOjbect |
In the results table, label the columns Desc and Acct Object. |
Important:
For event searches, the first class must be /event or a subclass of /event.
Do not use spaces in the results property.
Note:
The sort order defaults to the first item in the results table.Custom template names are always included on the list of templates in the Search dialog box. To optionally add a custom template to the Browse menu, you include two specific lines of text in the EventBrowserSearch.templates file. These entries identify the template and define its position on the menu.
These entries use the following syntax:
app.template.name.#=name app.template.description.#=name...
where:
app.template.name.# is the template name and menu position.
app.template.description.# is the string that will appear in the Browse menu and specifies the menu position. If this string is omitted or blank, the template name is used.
In the following example, the template named test will be the fifth selection on the Browse menu, where Testing... will be the menu command.
app.template.name.5=test app.template.description.5=Testing...
Important:
Do not use template numbers 1 through 4 for the .# value or you will overwrite default Browse menu items.The following list shows the names of the default search templates.
Important:
Do not use these names for your templates.account
account&bill
acct&usage
araccount&bill
balance
bitem
cashpay
charge
checkpay
creditpay
customer
date
deal
discount
dispute
generic
group
groupar
item
product
prod&date
registration
session
speccharge
A search template property is the key to which you associate a value when you define a custom template.
Table 30-2 lists the properties in a search template:
Table 30-2 Search Template Properties
Property | Description | Example |
---|---|---|
.class.n |
Defines the class being searched. n indicates the class number, which you assign. This number specifies the field to retrieve from the class during the search. The maximum number of classes allowed is four. |
search.template.customer.class.1 = /event search.template.customer.class.2 = /item search.template.customer.class.3 = /account |
.spec |
Search specification string. The number represents the class to which the field belongs and must precede the field name. |
search.template.customer.spec = 3.FldAccountNo like V1 and 2.FldItemNo = V2 |
.Vn.label |
The label for an entry field in the Search dialog box. Vn (value n) corresponds to Vn in the search string. |
search.template.customer.V1.label = Last Name |
.mergespec |
Defines the join relationship among the classes searched. The example shows the association between the /event, /item, and /account classes. |
search.template.customer.mergespec=1.FldAccountObject=3.FldPoid and 1.FldItemObj=2.FldPoid |
.results |
Defines the different fields returned from the different classes specified in the search. You can use variables to specify which column displays the fields. |
search.template.customer.results=R1:1.FldSysDesc, R2:2.FldAccountNo R1 indicates the first column in the results table, R2 the second column. 1.FldSysDescr specifies that the field description is from the class defined as 1 and the account number is from the class defined as 2. |
.caption |
Help information describing the purpose of the template. This text is displayed in the Search dialog box. |
search.template.customer.caption = Find Events associated with customers |
.enum |
List of entry fields as tag/value pairs. Each tag is displayed as a radio button in the Search dialog box. The value is entered as a value when searching. |
search.template.purchase.enum = Item:1 Ongoing_item:2 |
.name |
Specifies the template name in the drop-down list of templates in the Search dialog box. |
search.template.customer.name = Customer |
.Vn.value |
Defines a static value to use as a reference. |
search.template.customer.V1.value=0 |
.Rn.label |
Defines a label for a result in the results table. |
search.template.customer.results= R1.label=Account Number |
.sort |
Specifies a sort order different from the default sort order, which is the first item in the results table. |
search.template.customer.sort= 1.FldAccountNo |
This example is the default template named Customer. You can compare it to the Search dialog box and results table for that template to see how the template definition is rendered.
search.template.customer.name=Customer search.template.customer.class.1=/event search.template.customer.class.2=/account search.template.customer.spec=2.FldNameinfo[ANY].FldLastCanon like V1 and 2.FldNameinfo[ANY].FldFirstCanon like V2 and 2.FldNameinfo[ANY].FldPhones[ANY].FldPhone like V3 and 2.FldAccessCode1 like V4 and 2.FldAccessCode2 like V5 and 2.FldAccountNo = V6 search.template.customer.mergespec=2.FldPoid = 1.FldAccountObj search.template.customer.caption=Find Events associated with customer(s). search.template.customer.V1.label=Last Name: search.template.customer.V2.label=First Name: search.template.customer.V3.label=Phone Number: search.template.customer.V4.label=Access Code 1: search.template.customer.V5.label=Access Code 2: search.template.customer.V6.label=Account Number: search.template.customer.results=R1:1.FldAccountObj.FldAccountNo,R2:1.FldSysDescr,R3:1.FldEndT search.template.customer.R1.label=Account Number search.template.customer.R2.label=Event Description search.template.customer.R3.label=Date