Defining a main tool definition

The first step to adding a new custom tool to the Management Center is to create a new OpenLaszlo library file containing a class that extends the wcfBusinessObjectEditor classIntroduced in Feature Pack 2 or to create a new definition file containing a definition that extends the wcfBusinessObjectEditor class.

Before you begin

Before you customize the Management Center user interface, ensure you have customized the persistence layer and the Business Object Manager:
  1. Created a new WebSphere Commerce table in the schema.
  2. Generated object relational metadata and the physical SDO.
  3. Configured the Business Object Manager to include new properties in user data.
  4. Updated query templates for read and update.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config.
  3. Create a directory to store your new file:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo library file WebSphere Commerce Version 7.0.0.0Feature Pack 1Use a directory structure similar to the following example: LOBTools/WebContent/WEB-INF/src/lzx/your_company_name/Management_Center_component, where Management_Center_component is the name of your new custom tool.
    Introduced in Feature Pack 2Definition file Introduced in Feature Pack 2Use a directory structure similar to the following example: LOBTools/WebContent/config/your_company_name/Management_Center_component, where Management_Center_component is the name of your new custom tool.
  4. Create the new file:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo library file WebSphere Commerce Version 7.0.0.0Feature Pack 1Use the following syntax for your library file: ToolNameManagementToolDefinition.lzx

    For example, the Catalogs tool business object editor class is contained in a file named CatalogManagementToolDefinition.lzx.

    Introduced in Feature Pack 2Definition file Introduced in Feature Pack 2Use the following syntax for your definition file: ToolNameManagementToolDefinition.def

    For example, the Catalogs tool business object editor definition is contained in the file named CatalogManagementToolDefinition.def.

  5. Within this new file, complete one of the following steps:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo library file WebSphere Commerce Version 7.0.0.0Feature Pack 1Create a class that extends the lzx/commerce/foundation/restricted/BusinessObjectEditor.lzx/wcfBusinessObjectEditor class.
    For example:
    <library> 
    
      <class name="extMyTool" extends="wcfBusinessObjectEditor">. 
        <!—- Add the context value definitions --> 
        ... 
    
      <!—- Add the instantiations for the init service definitions --> 
        ... 
    
      <!—- Add the instantiations for the filter definitions --> 
        ... 
    
      <!—- Add the instantiations for organizational and primary business objects --> 
        ... 
    
      <!—- Add the instantiations for all search definitions --> 
        ... 
    
      </class> 
    </library> 
    Introduced in Feature Pack 2Definition file Introduced in Feature Pack 2Create a definition that extends the lzx/commerce/foundation/restricted/BusinessObjectEditor.lzx/wcfBusinessObjectEditor class.
    For example:
    <Definitions>
    	<BusinessObjectEditor definitionName="extMyTool">
    		<!-- Add the context value definitions --> 
    		... 
    
    		<!-- Add the init service definitions --> 
    		... 
    
    		<!-- Add the filter definitions --> 
    		... 
    
    		<!-- Add the organizational and primary business objects --> 
    		... 
    
    		<!-- Add the search definitions --> 
    		...
    	</BusinessObjectEditor>
    </Definitions>

What to do next

Define the definitions that are required in this tool definition.