Click Select. Select a query from the list. Click OK.

Managing Components 6-13

6.3.2.3 Creating a Query Resource

A query resource defines SQL queries, which are used to manage information in the database. Queries are used with services to perform tasks such as adding, deleting, or retrieving data from the database. Follow these steps to add a query:

1. On the

Component Wizard Main Screen , click Add in the Resource Definition pane . The Add Resource Screen is displayed.

2. Select the Query option.

3. Enter the file name for the resource file. The default file name is

resourcescomponentname_query.htm. ■ If a query resource file has been created with the default file name, the new default file name will have a number 1, 2, and so on appended to it. You cannot append a query table to the existing default file unless you edit the resource file manually. ■ If a query resource file has been created with a file name other than the default, you can append a new query table to the existing file. ■ To create a new resource file with a different file name, enter the file name.

4. If you want the new resource file to be loaded in a particular order, enter the

number in the Load Order field.

5. Click Next.

The Add Query Table Information Screen is displayed.

6. Enter a name for the query table. It is a good idea to leave the name of the

component as a prefix. ■ If you are appending to an existing query resource file, you must enter a new table name. You cannot append a query definition to the existing table unless you edit the resource file manually.

7. Click Next.

The AddEdit Query Screen is displayed.

8. To start with an existing query definition:

a. Click Select.

A list of predefined queries is displayed.

b. Select a query from the list.

c. Click OK.

The query expression and parameters are displayed and the Name field is filled in. Note: Unless you have a particular reason for the resource file to be loaded after other resources, you should leave the load order set to 1. 6-14 Oracle Fusion Middleware System Administrators Guide for Oracle Content Server 9. Edit the query expression and parameters as necessary. ■ Parameters must appear in the Parameters list in the order they appear in the query expression. Use the Up and Down buttons to move the selected parameter. ■ To add a parameter, click Add. Enter a parameter Name, select the parameter Type, and click OK. ■ To edit a parameter type, select the parameter and click Edit. Select the parameter Type, and click OK. ■ To remove a parameter, select the parameter and click Delete. 10. Click Finish. A dialog box asks if you want to launch the text editor to continue editing.

11. Click Yes to open the resource file in the text editor. Click No to return to the

Component Wizard. The query resource file now appears in the Custom Resource Definition list, and the query table appears in the Table Name list in the right pane.

6.3.2.4 Creating a Service Resource

A service resource defines a function or procedure that is performed by the Oracle Content Server instance. Use the following procedure to create a service resource using the Component Wizard.

1. In the Component Wizard, open the component the resource will be created for.

2. On the Resource Definition tab, click Add.

The Add Resource Screen is displayed.

3. Select the Service option.

4. Enter the file name for the resource file. The default file name is

resourcescomponentname_service.htm. ■ If a resource file has been created for services, you can append the new service table to the existing file by selecting the file name. Any changes you make to the load order now will apply to the entire resource file. ■ To create a new resource file with a different file name, enter the file name.

5. If you want the new resource file to be loaded in a particular order, enter the

number in the Load Order field.

6. Click Next.

The Add Service Table Information Screen is displayed. Note: If you do not change the name of the query and this component is loaded last, the custom query will override the standard query and any other custom queries with the same name. Note: Unless you have a particular reason for the resource file to be loaded after other resources, you should leave the load order set to 1. Managing Components 6-15 7. Enter a name for the service table. ■ It is a good idea to leave the name of the component as a prefix. ■ Each service table in a component must have a unique name, even if the tables are in different resource files.

8. Click Next.

The AddEdit Service Screen is displayed. 9. To start with an existing service definition:

a. Click Select.