Integrating tools into a Tools User Interface Center

You can integrate a tool into Tools User Interface Center by using the XML and resource bundle files for the tool. The following steps describe how to integrate a tool with WebSphere Commerce Accelerator.

Procedure

  1. Open the following file:
    • WC_instaldir/wc.ear/xml/tools/common/CommerceAccelerator.xml
    • WebSphere Commerce DeveloperWC_profiledir/xml/tools/common/CommerceAccelerator.xml

    Add menu items, nodes, or both to the preceding XML file similar to the following example:

    
    <menuitem name="customerService" enabled="true" component="CommerceAnalyzer" users="cusRep merchant siteAdmin"> 
      <node name="customers" component="CampaignManagement" url="/webapp/wcs/tools/servlet/Calendar" users="merchant" />
    .
    .
    .
    </menuitem>
    

    Both the <menuitem> and the <node> elements support the following attributes, as used in the preceding code sample:

    Attribute Description
    name A mandatory attribute that names the menu. This name is a key in the resource bundle file. If null, a default message is used. For example,
    
    menuName ="myMenuText"
    
    enabled A mandatory attribute for the <menuitem> element, which determines whether the menu is available for selection. The value can be either true or false.
    component An optional element that specifies the component with which the menu item is associated. Components can be turned on or off using Configuration Manager. A menu item that is associated with a component that is disabled does not display.
    url A mandatory element that specifies the target URL for the menu item. When this URL is called, the tool displays in the content frame.
    users A mandatory attribute that defines the access control for the menu. Unauthorized users do not see the menu or node when they log on. The value must be a space delimited list of the roles that are permitted to perform the action that is associated with the menu item. These names are predefined in the Roles.xml file, and match the ID column in the ROLE database table. For example,
    users="makMgr merMgr merchant siteAdmin"
    

    The Roles.xml file is in the WC_profiledir/xml/tools/common directory.

    type An optional attribute that specifies the type of the menuitem, help is the only value supported.
    display - optional An optional attribute that specifies whether this menuitem is visible or not. The default value is true.
  2. Create a resource bundle.
  3. Update the resource bundle for the menu and node name.
    For example, the resource bundle file for WebSphere Commerce Accelerator is the following file
    • WC_installdir/properties/com/ibm/commerce/tools/properties/mccNLS_locale.properties
    • WebSphere Commerce Developer workspace_dir/wc/properties/com/ibm/commerce/tools/properties/mccNLS_locale.properties

    If you are customizing a different Tools User Interface Center, find the reference to the resource bundle file name at the top of the XML file. The reference to the file name can display, in a line similar to the following example:

    
     <menu resourceBundle="common.mccNLS">