Service Registry 3.1 Administration Guide

Configuring the Web Console

As an administrator, you can customize some aspects of the Web Console display by editing configuration files.

This section describes the following tasks:

For information about using the Web Console, see the Service Registry 3.1 User’s Guide.

Adding Predefined Queries

Service Registry includes several predefined queries, which appear in the Web Console Search form in the Select Predefined Query drop-down list. As an administrator, you can add new queries to the drop-down list that are specific to your installation of the Registry.

ProcedureTo Add a Predefined Query

  1. Use the Web Console to publish an AdhocQuery object to the Registry.

    The name and description you specify for the query will appear in the drop-down list of predefined queries. In the SQL statement for the query, specify placeholders for user-supplied data by enclosing them in pairs of single quotes, as follows:

    select * from registryobject where id = ''$lid''
  2. Write down the unique identifiers of the AdhocQuery object and of any placeholders in the SQL statement, or copy and paste them into a file.

  3. Change to the directory RegistryDomain-base/3.0/jaxr-ebxml.

  4. Open the file registry-browser-config.xml in a text editor.

    Make a copy of the original file so that you can back out your changes if you need to.

  5. Add an entry to the registry-browser-config.xml file, using the following format. Specify a Parameter element for each placeholder in the SQL statement.

    <Query>
      <AdhocQueryRef id="unique-identifier"/>
      <Parameter parameterName="$placeholder-name" datatype="string">
        <rim:Name>
          <rim:LocalizedString xml:lang="en" charset="UTF-8" 
            value="parameter-name-in-en-locale"/>
          <rim:LocalizedString xml:lang="fr" charset="UTF-8" 
            value="parameter-name-in-fr-locale"/>
        </rim:Name>
        <rim:Description>
          <rim:LocalizedString xml:lang="en" charset="UTF-8" 
            value="parameter-description-in-en-locale"/>
          <rim:LocalizedString xml:lang="fr" charset="UTF-8" 
            value="parameter-description-in-fr-locale"/>
        </rim:Description>
      </Parameter>
      ...
    </Query>

    The unique-identifier is the unique identifier of the AdhocQuery object.

    The parameterName attribute value for each parameter must come from a placeholder in the SQL statement for the query.

    The datatype attribute can have any of the following values:

    • string: The parameter appears as a text field in the Search form.

    • taxonomyElement: The parameter appears as a drop-down list in the Search form. If you specify a taxonomyElement data type, the Name and Description elements must be followed by a SlotList element that looks like this:

      <rim:SlotList>
        <rim:Slot name="domain">
          <rim:ValueList>
            <rim:Value>
            classification-scheme-or-concept-id
            </rim:Value>
          </rim:ValueList>
        </rim:Slot>
      </rim:SlotList>

      The classification-scheme-or-concept-id is the unique identifier of the classification scheme or concept whose concepts (or subconcepts) must appear in the drop-down list. You must publish the classification scheme if it does not already exist in the registry.

      The slot name must be "domain".

    • boolean: The parameter appears as a checkbox in the Search form.

    If the datatype is string or boolean, you can also add a defaultValue attribute to the Parameter element to specify a default value to appear in the Search form.

    Specify localized string values for each parameter name and description for any locales you support. The parameter-name in the current locale appears as the label of the parameter in the Search form.

    Use the existing entries in the registry-browser-config.xml file as a reference.

  6. Save and close the registry-browser-config.xml file.

  7. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry.

Changing the Default Query

The query that appears as the default in the Select Predefined Query drop-down list is Basic Query, which allows users to search for registry objects by name, description, and classification.

As an administrator, you can change this default to a query that is appropriate to your installation. For example, you might want the default query to be a new predefined query that you added to the Registry, as described in Adding Predefined Queries. To make this change, edit a property in a configuration file.

ProcedureTo Change the Default Query

  1. Change to the directory RegistryDomain-base/domains/registry/applications/j2ee-modules/soar/WEB-INF/classes.

  2. Open the file jaxr-ebxml.properties in a text editor.

  3. Find the definition of the property jaxr-ebxml.thin.defaultQueryPanel. By default, this property is commented out:

    #jaxr-ebxml.thin.defaultQueryPanel=
  4. Remove the comment character (#).

  5. Set the value of the property by specifying the logical identifier of the query that will be the default, as in the following example:

    jaxr-ebxml.thin.defaultQueryPanel=urn:oasis:names:tc:ebxml-regrep:query:MyQuery
  6. Save and close the jaxr-ebxml.properties file.

  7. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry.

Hiding Classification Schemes

A tree structure of classification schemes appears in the following areas of the Web Console:

As an administrator, you can hide classification schemes from view if you do not want the classification schemes to be available to users of Service Registry. To hide classification schemes, define a property in a configuration file.

ProcedureTo Hide Classification Schemes

  1. Change to the directory RegistryDomain-base/domains/registry/applications/j2ee-modules/soar/WEB-INF/classes.

  2. Open the file jaxr-ebxml.properties in a text editor.

  3. Set the property jaxr-ebxml.registryBrowser.ConceptsTreeModel.hiddenSchemesList by using the following syntax. All of the property definition must be on one line and must not contain spaces.

    jaxr-ebxml.registryBrowser.ConceptsTreeModel.hiddenSchemesList=
    class-scheme-id1|class-scheme-id2|...

    Specify the logical identifier of each classification scheme that is to be hidden. If you specify more than one identifier, separate the identifiers with a vertical bar (|), as in the following example:

    jaxr-ebxml.registryBrowser.ConceptsTreeModel.hiddenSchemesList=
    urn:oasis:names:tc:ebxml-regrep:classificationScheme:StatusType|
    urn:oasis:names:tc:ebxml-regrep:profile:ws:classificationScheme:BindingType
  4. Save and close the jaxr-ebxml.properties file.

  5. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry.

Configuring the Search Results Display

By default, the Web Console displays 25 search results at a time for each query. If the search returns more than 25 results, users can display additional pages of results. As an administrator, you can modify the number of search results that appears on each page.

By default, the Web Console displays certain columns in the search results area. For each object, it displays the object type, name, description, version, and version comment. For some object types, a non-default display is configured. For example, for a ServiceBinding object, the display includes the endpoint instead of the version information. As an administrator, you can add configuration information to display non-default data for object types of your choice.

To perform each of these tasks, you edit a configuration file.

ProcedureTo Configure the Number of Rows in the Search Results Display

  1. Change to the directory RegistryDomain-base/domains/registry/applications/j2ee-modules/soar/WEB-INF/classes.

  2. Open the file jaxr-ebxml.properties in a text editor.

  3. Find the definition of the property omar.client.thinbrowser.numSearchResults:

    omar.client.thinbrowser.numSearchResults=25
  4. Change the value 25 to the value you prefer.

  5. Save and close the jaxr-ebxml.properties file.

  6. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry.

ProcedureTo Configure the Columns in the Search Results Area

You can configure columns in the Search Results area for object types. The columns display the attributes of the objects.

  1. Change to the directory RegistryDomain-base/3.0/jaxr-ebxml.

  2. Open the file registry-browser-config.xml in a text editor.

  3. Add an entry to the registry-browser-config.xml file, or edit an existing one. Use the following format.

    This example configures a non-default display for Service objects.

    <ObjectTypeConfig 
        className="org.freebxml.omar.client.xml.registry.infomodel.ServiceImpl" 
        id="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Service">
      <SearchResultsConfig>
        <SearchResultsColumn columnClass="java.lang.Object" 
          columnHeader="Object Type" columnWidth="25" editable="false" 
          method="getObjectType"/>
        <SearchResultsColumn columnClass="java.lang.Object" 
          columnHeader="Name" columnWidth="25" editable="true" method="getName"/>
        <SearchResultsColumn columnClass="java.lang.Object" 
          columnHeader="Description" columnWidth="30" editable="true" 
          method="getDescription"/>
        <SearchResultsColumn columnClass="java.lang.Object" 
          columnHeader="Status" columnWidth="15" method="getStatusAsString"/>
        <SearchResultsColumn columnClass="java.lang.Object" 
          columnHeader="Version" columnWidth="5" method="getVersionName"/>
      </SearchResultsConfig>
    </ObjectTypeConfig>

    The registry-browser-config.xml file provides syntax for the ObjectTypeConfig element. Use the elements that are already in the file as examples. These elements configure the default display for registry objects as well as non-default displays for ExternalLink, ExtrinsicObject, and ServiceBinding objects.

    The maximum number of columns that you can configure is 30.

    For the SearchResultsColumn element:

    • The columnClass attribute value is always java.lang.Object.

    • The columnHeader attribute value is a key to a message in the Web Console resource bundle files. These files are contained in the directory registryDomain-base/domains/registry/applications/j2ee-modules/soar/WEB-INF/classes/org/freebxml/omar/client/ui/thin/. For example, if you type Object Type for the columnHeader value, the Web Console's backing beans use the WebResourceBundle class to look up a message with that key. If the WebResourceBundle fails to find the message, it converts the key to lowercase and tries again. If this fails again, it sets the message value to"???"+key+"???" and logs a warning message about the missing resource bundle entry. So, to add new localized columnHeader values, you must enter new message keys into the ResourceBundle files contained in this directory.

    • The columnWidth attribute is not used by the Web Console.

    • The editable attribute is not used by the Web Console.

    • For the most part, you can deduce the method names for the method attribute from the class attributes in the ebXML Registry Information Model Version 3.0 specification (see Before You Read This Book for details). The getStatusAsString method can be found in the RegistryObjectImpl implementation class. (This release of Service Registry does not include API documentation, however.)

    You can have no more than one ObjectTypeConfig element for each omar.client.xml.registry.infomodel class name.

  4. Save and close the registry-browser-config.xml file.

  5. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry.

  6. To verify the reconfiguration, use the Search or Explore menu of the Web Console to display the objects whose columns you changed.