Mapping between Management Center objects and nouns

URL parameter groups define the relationship between Management Center objects and WebSphere Commerce nouns.

When you are transforming a URL request into a Process BOD or Change BOD request, you must describe the noun to build the appropriate action expressions. Then, you must define the URL parameters as elements and attributes in the noun. The URL definition describes the parameter groups that contain the URL parameter name to noun element and attribute mapping.

URL parameter groups (URLParameterGroup)

URL parameters are defined in a group as a commented set of URL parameter names that correspond to a specific noun or noun part. You can use URL parameter groups to ensure that common URL parameter names are used to represent Management Center objects and how they relate to noun elements.

In addition to declaring the URL parameter name to noun element or attribute definition, a URL parameter group can also include other URL parameter groups. When Management Center objects that share a common group are represented differently in the Management Center web application, some URL parameter groups can be reused. For example, if a noun represents an abstract Management Center object and the URL is declaring specific instances of that object, you can use the included parameter groups to reuse the mapping. Lower-level elements can be the same and can reuse the same URL parameter names. Top-level elements, however, can use a different set of URL parameter names to better represent how the Management Center web application models the Management Center object.

The configuration files for mapping Management Center objects to WebSphere Commerce nouns are in the LOBTools web application:
  • workspace_dir\LOBTools\WebContent\WEB-INF\config\com.ibm.commerce.component\wc-component-clientobjects.xml
If you customize Management Center by creating a noun, create a mapping file for the noun. If you use UserData as a noun extension point, you do not need to change the Management Center to WebSphere Commerce nouns mapping file. Do not change any mapping file that is provided by WebSphere Commerce. Create your own wc-component-clientobjects.xml mapping file to map your custom Spring framework configurations and custom client object configurations.
The following code shows an example of the mapping between the URL parameters that represent the Management Center product object and the catalog entry noun.

<!-- The following URL parameter group defines the URL parameters that represent the Management Center product, 
     kit, and bundle objects and how they relate to the catalog entry noun. -->
<_config:URLParameterGroup name="CatalogEntry" 1 
  noun="CatalogEntry">

<!--  Map the properties of the primary object to elements and attributes of the catalog entry -->
  <_config:URLParameter name="catentryId"
    nounElement="/CatalogEntryIdentifier/UniqueID" 2 
    key="true" 3
    return="true" 4 />
  <_config:URLParameter name="typeCode" nounElement="/@catalogEntryTypeCode" />
  <_config:URLParameter name="catenttypeId" nounElement="/@catalogEntryTypeCode" />
  <_config:URLParameter name="ownerId" nounElement="/CatalogEntryIdentifier/ExternalIdentifier/@ownerID" key="false" return="true" />
  <_config:URLParameter name="partnumber" nounElement="/CatalogEntryIdentifier/ExternalIdentifier/PartNumber" return="true"/>
  <_config:URLParameter name="parentCatalogGroupId" nounElement="/ParentCatalogGroupIdentifier/UniqueID"/>
  <_config:URLParameter name="parentCatalogEntryId" nounElement="/ParentCatalogEntryIdentifier/UniqueID" />
  <_config:URLParameter name="sequence" nounElement="/@displaySequence" key="true"/>		

<!--  Declaring the generic property prefix that has the built-in UserData support -->
  <_config:URLParameter name="x_" nounElement="/UserData/UserDataField" type="UserData" 5 />

<!--  Include the child objects -->
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryExtraProperties" 6/>
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryDescription" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryDescriptionOverride" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryListPrice" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryInventory" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryAttributes" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntryAttributesAllowedValue" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntrySeoAttributes" />
  <_config:IncludeURLParameterGroup urlParameterGroup="CatalogEntrySeoURL" />  
</_config:URLParameterGroup>

<!--  The following URL parameter group defines the URL parameters that represent the Management Center product description object
      and how they relate to the catalog entry description element that is part of the catalog entry Noun -->
<_config:URLParameterGroup name="CatalogEntryDescription" noun="CatalogEntry">

<!--  Map the product description properties to the catalog description elements and attributes -->
  <_config:URLParameter name="catentryId" nounElement="/CatalogEntryIdentifier/UniqueID" key="true" return="true" />
  <_config:URLParameter name="descriptionLanguageId" nounElement="/Description/@language" key="true" return="true" />
  <_config:URLParameter name="name" nounElement="/Description/Name" key="false" />
  <_config:URLParameter name="sDesc" nounElement="/Description/ShortDescription" key="false" />
  <_config:URLParameter name="lDesc" nounElement="/Description/LongDescription" key="false" />
  <_config:URLParameter name="tImage" nounElement="/Description/Thumbnail" key="false" />
  <_config:URLParameter name="fImage" nounElement="/Description/FullImage" key="false" />
  <_config:URLParameter name="keyword" nounElement="/Description/Keyword" key="false" />

<!--  Declaring the generic property prefix that has the built-in UserData support to add additional description information -->
  <_config:URLParameter name="xdesc_" nounElement="/Description/Attributes" type="UserData" />
</_config:URLParameterGroup>
Note: The name attribute for UserData can contain only a single underscore character, which must immediately follow the prefix. For example, the following code snippet identifies a UserData object as "x_myParam"

<_config:URLParameter name="x_myParam" nounElement="/UserData/UserDataField" type="UserData" />
1 name
The name of the URL parameter.
2 nounElement
The element or attribute of the noun with which the value is associated. To map to an element, use the format nounElement="/ElementName". To map to an attribute, use the format nounElement="/ElementName/@AttributeName".
3 key
Optional. The unique identifier of the noun or the complex type of the noun. The default value is false.
4 return
Optional. Specifies whether the noun element is to be included in the response when the response object is being built. The default value is false unless the value of the key attribute is true.
5 type
Optional. The data type of the noun element or attribute. If a value of UserData is specified, then the URL parameter mapping has special meaning and the URL parameter name begins with the specified name attribute. URL parameters of type UserData where the name of the element is part of the URL parameter name have special parsing behavior. The name and value are mapped to a new object, as indicated by the nounElement attribute. You can also specify the UserDataAssociation element for a more complex object mapping.
6 IncludeURLParameterGroupurlParameterGroup
Specifies a declared URL parameter group to include as part of the current URL parameter group. At run time, the URL parameter names of the included URL parameter groups are merged to describe a complete URL parameter name to noun element or attribute mapping.
allowEmpty
Optional. Specifies whether the value of this parameter can be empty. If it cannot be empty, an application error is created so that the service does not execute. The default value is true.

<_config:URLParameter name="attrValValue" nounElement="/CatalogEntryAttributes/Attributes/StringValue/Value" 
  key="false" return="false" allowEmpty="false"/>
  
actionExpression
Optional: Specifies whether the action expression is created in the change verb to specify that this noun, or a changeable part of the noun, is modified. The default value is true, unless the value of the key attribute is true. In the following code snippet, the parentCategoryId URL parameter includes the actionExpression attribute:

<_config:URLParameter name="parentCategoryId" nounElement="/ParentCatalogGroupIdentifier/UniqueID" 
  key="false" return="true" actionExpression="true" />
The URL parameter configuration for a URL parameter name defines the values that correspond to anelement or attribute of the noun that is specified by the URL parameter group. You can specify any of the following values as part of the URL parameter configuration:
  • A noun definition to list the nouns and noun parts for a service module. the Campaign noun is a noun with no parts. The Activity noun includes the CampaignElement part.
    
    <_config:NounDefinitions>
      <_config:Noun name="Campaign"/>
      <_config:Noun name="Activity">
        <_config:NounElement name="CampaignElement" part="true"/>
      </_config:Noun>
      <_config:Noun name="MarketingEmailTemplate"/>
     ...
    </_config:NounDefinitions>
  • A URL definition to link URL parameter names from Management Center to WebSphere Commerce nouns. The following code snippet maps the Activity noun that is shown in the preceding code snippet with the CampaignElement part.
    
    <_config:URLParameterGroup name="Activity" noun="Activity">
      <_config:URLParameter name="activityId" nounElement="/ActivityIdentifier/UniqueID" key="true" return="true" />
      <_config:URLParameter name="campaignId" nounElement="/CampaignIdentifier/UniqueID" key="false" />
      <_config:URLParameter name="name" 
        nounElement="/ActivityIdentifier/ExternalIdentifier/Name" />
      <_config:URLParameter name="storeId" 
        nounElement="/ActivityIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" key="false" return="true" />
      <_config:URLParameter name="storeentId" 
        nounElement="/ActivityIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" key="false" return="true" />		
      <_config:URLParameter name="version" nounElement="/Version" />
      <_config:URLParameter name="published" nounElement="/PublishedVersion" />
      <_config:URLParameter name="state" nounElement="/State" return="true"/>
      <_config:URLParameter name="startdate" nounElement="/StartDate" nillable="true" />
      <_config:URLParameter name="enddate" nounElement="/EndDate" nillable="true" />
      <_config:URLParameter name="repeatable" nounElement="/Repeatable" />
      <_config:URLParameter name="priority" nounElement="/Priority" />
      <_config:URLParameter name="activityType" nounElement="/Format" />
      <_config:URLParameter name="description" nounElement="/Description" />
      <_config:URLParameter name="flowxml" nounElement="/RuntimeXMLDefinition" />
      <_config:URLParameter name="experimentType" nounElement="/ExperimentFormat" />
      <_config:URLParameter name="templateType" nounElement="/TemplateFormat" />
      <_config:URLParameter name="x_" nounElement="/UserData/UserDataField" type="UserData" />
      <_config:IncludeURLParameterGroup urlParameterGroup="CampaignElement"/>
    </_config:URLParameterGroup>	
    
    <_config:URLParameterGroup name="CampaignElement" noun="Activity">
      <_config:URLParameter name="activityId" 
        nounElement="/ActivityIdentifier/UniqueID" key="true" return="false" actionExpression="false" />
      <_config:URLParameter name="parentElementName" nounElement="/CampaignElement/ParentElementIdentifier/Name" />
      <_config:URLParameter name="PROPERTY_sequence" nounElement="/CampaignElement/ElementSequence" />
      <_config:URLParameter name="PROPERTY_elementName" nounElement="/CampaignElement/CampaignElementIdentifier/Name" />
      <_config:URLParameter name="PROPERTY_elemTemplateName" 
        nounElement="/CampaignElement/CampaignElementTemplateIdentifier/ExternalIdentifier/Name" />
      <_config:URLParameter name="PROPERTY_elemTemplateType" 
        nounElement="/CampaignElement/CampaignElementTemplateIdentifier/ExternalIdentifier/CampaignElementFormat" />
      <_config:URLParameter name="elemTemplateName" 
        nounElement="/CampaignElement/CampaignElementTemplateIdentifier/ExternalIdentifier/Name" />
      <_config:URLParameter name="elemTemplateType" 
        nounElement="/CampaignElement/CampaignElementTemplateIdentifier/ExternalIdentifier/CampaignElementFormat" />
      <_config:URLParameter name="PROPERTY_" 
        nounElement="/CampaignElement/CampaignElementVariable" type="UserData" >
        <_config:ParameterAssociation name="ASSOCIATEDPROPERTY_sequence_" value="/SequenceOrder" />
      </_config:URLParameter>								
      <_config:URLParameter name="xelem_" nounElement="/UserData/UserDataField" type="UserData" />
    </_config:URLParameterGroup>