Administration Guide
Custom functions are user-defined functions that performed specialized tasks. Before a BEA Liquid Data for WebLogic query can access a custom function, the custom function must be configured on the Custom Functions tab on the Liquid Data node in the Administration Console. This chapter describes how to configure access to custom functions. It includes the following sections:
For additional information, see Using Custom Functions in Invoking Queries Programmatically.
The Data View Builder provides a set of standard functions for use in creating data views and queries using various types of joins and mappings. You can also extend the Data View Builder by creating custom functions to perform specialized tasks.
This section includes the following parts:
Custom functions allow you to perform specialized operations that are not available in standard functions. There are many possible use cases for custom functions in Liquid Data. The following list provides just a few examples of what custom functions can do:
name_title
column might contain numeric codes (1, 2, 3, and so on) that represent text (Mr., Mrs., Ms., Dr., and so on) rather than the text itself. A custom function could be created to decode the data in the column and return the text instead.A custom function is implemented in Java code and declared in a custom functions library definition (CFLD) file. For detailed information about these tasks, see Using Custom Functions in Invoking Queries Programmatically.
Once implemented and declared in the Liquid Data Server repository, a custom function description must be created for each custom function. A custom function description defines the following information:
Once configured according to the instructions in this section, custom functions with custom function descriptions will show up as functions available for use in any Data View Builder client that connects to this server.
To configure custom functions, administrators perform the following tasks:
custom_lib
folder in the Liquid Data Server repository, as described in Uploading Files to the Server Repository.custom_functions
folder in the Liquid Data Server repository, as described in Uploading Files to the Server Repository.
Note: You must log in with modify
access before you can create a custom function description. For more information, see Defining Liquid Data Roles and Groups.
To create a custom function description for a group of custom functions:
custom_lib
folder in the Liquid Data Server repository, and that the CFLD file declaring the custom functions resides in the custom_functions
folder in the Liquid Data Server repository. The Administration Console displays the configuration tab for creating a new custom function description.
Figure 14-1 Configuring a Custom Function Description
Logical name of the group of custom functions declared in the custom functions library definition (CFLD) file. Custom function names must start with an alphabetic character (a-z or A-Z). |
|
File name of the CFLD file that declares this custom function in an XML format. This file usually resides in the Either type the CFLD file name or click Browse Repository to browse the |
The summary table on the Custom Functions tab on the Liquid Data node shows a list of custom function groups that have been configured with custom function descriptions on the current server. From the summary list, you can perform the following tasks:
Note: You must log in with modify
access before you can assign security policies to a custom function description. For more information, see Defining Liquid Data Roles and Groups.
You can configure security for each custom function description using security policies. You need to assign execute
permissions to users who are authorized to execute queries that use particular custom functions. For more information about Liquid Data security, see Defining Liquid Data Roles and Groups
Note: In the Repository tab on the Liquid Data node, you can assign modify
and read
access to CFLD files and JAR files associated with custom functions. The security policies assigned in the Custom Functions tab determine whether a user can execute a query in which a custom function is used. The security policies in the Repository tab determine whether the user logged into the Administration Console can modify or read the CFLD or JAR files in the repository.
Perform the following steps to assign security policies to a data source:
Note: You must log in with modify
access before you can modify a custom function description. For more information, see Defining Liquid Data Roles and Groups.
You can modify a custom function description to change the logical name of the custom function group or the name of the CFLD file in which the custom function group is declared.
To modify a custom function description:
Note: You must log in with modify
access before you can remove a custom function description. For more information, see Defining Liquid Data Roles and Groups.
You can remove a custom function description that you no longer need. To remove a custom function description:
Note: Removing a Liquid Data custom function description does not remove the JAR or CFLD files associated with the custom function group from your system.To remove these files from the Liquid Data Server repository, see Deleting Folders and Files in the Server Repository.