Develop > Controller layer > Management Center Web application > Map between the Management Center client and WebSphere Commerce nouns > Process Management Center services


Map between Management Center objects and nouns

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

To transform a URL request into a Process BOD or Change BOD request, describe a noun to build the appropriate action expressions, then 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 the 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 might be reused. For example, if a noun represents an abstract Management Center object and the URL wants to declare specific instances of that Management Center object, you can use the included parameter groups to reuse the mapping. Although the lower level elements might be the same and should reuse the same URL parameter names, the top-level elements might 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 is located in the LOBTools Web application:

If you customize the Management Center by creating a new noun, then create a mapping file. If you use UserData as a noun extension point; then you do not need to change the Management Center to WebSphere Commerce nouns mapping file. Do not change the mapping file provided by WebSphere Commerce, as a customization should not modify an existing client objects mapping file. Create the own mapping file, so that custom struts actions and custom client object configuration files can be defined. Use the file name /WEB-INF/struts-extension.xml.

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" />     
<!--  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 object CatalogEntryExtraProperties -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryExtraProperties" 6  /> 
<!--  Include the child object CatalogEntryDescription -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryDescription" /> 
<!--  Include the child object CatalogEntryListPrice -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryListPrice" /> 
<!--  Include the child object CatalogEntryInventory -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryInventory" /> 
<!--  Include the child object CatalogEntryAttributes -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryAttributes" /> 
<!--  Include the child object CatalogEntryAttributesAllowedValue -->
<_config:IncludeURLParameterGroupurlParameterGroup="CatalogEntryAttributesAllowedValue" /> 
</_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>

The name attribute for userdata can only contain one underscore, which must immediately follow the prefix. For example:

<_config:URLParameter name="x_myParam" nounElement="/UserData/UserDataField" type="UserData" />

  1. name

    The URL parameter name.

  2. nounElement

    The element or attribute of the noun with which the value should be 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 if the noun element should be included in the response when building the response object. 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 runtime, 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.

  7. allowEmpty

    Optional: Specifies if 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:URLParameterGroup name="CatalogEntryAttributes" noun="CatalogEntry">
    <!-- Attribute Properties -->
    <_config:URLParameter name="catentryId" nounElement="/CatalogEntryIdentifier/UniqueID" key="true" return="true" />
    <_config:URLParameter name="catalogEntryAttributesLanguageId" nounElement="/CatalogEntryAttributes/Attributes/@language" key="true" return="false" />
    <_config:URLParameter name="attrUsage" nounElement="/CatalogEntryAttributes/Attributes/@usage" key="true"
    return="false" />
    <_config:URLParameter name="attrDataType" nounElement="/CatalogEntryAttributes/Attributes/AttributeDataType"
    key="true" return="false" />
    <_config:URLParameter name="attrName" nounElement="/CatalogEntryAttributes/Attributes/Name" key="false"
    return="false" />
    <_config:URLParameter name="attrDescription" nounElement="/CatalogEntryAttributes/Attributes/Description"
    key="false" return="false" />
    <_config:URLParameter name="attrDisplaySequence" nounElement="/CatalogEntryAttributes/Attributes/@displaySequence"
    key="false" return="false" />
    <_config:URLParameter name="attrValValue" nounElement="/CatalogEntryAttributes/Attributes/StringValue/Value"
    key="false" return="false" allowEmpty="false"/>
    <_config:URLParameter name="sku_parentCatalogEntryId" nounElement="/ParentCatalogEntryIdentifier/UniqueID" key="true"
    return="false" />
    

  8. actionExpression

    Optional: Specifies if the action expression should be created in the change Verb to specify that this noun, or a changeable part of the noun, has been modified. The default value is true unless the value of the key attribute is true. For example /ParentCatalogGroupIdentifier from the following snippet:

    <_config:URLParameterGroup name="CatalogGroupParentCatalogGroup"
    noun="CatalogGroup">
    <_config:URLParameter name="catgroupId"
    nounElement="/CatalogGroupIdentifier/UniqueID" key="true" />
    <_config:URLParameter name="identifier"
    nounElement="/CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier" />
    <_config:URLParameter name="owningStoreId"
    nounElement="/CatalogGroupIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" key="true"/>
    <_config:URLParameter name="parentOwningStoreId"
    nounElement="/ParentCatalogGroupIdentifier/ExternalIdentifier/StoreIdentifier/UniqueID" key="true"/> <_config:URLParameter name="parentCategoryId"
    nounElement="/ParentCatalogGroupIdentifier/UniqueID" key="false"
    return="true" actionExpression="true" /><_config:URLParameter name="isTopCategory"
    nounElement="/@topCatalogGroup" key="true"/>
    <_config:URLParameter name="x_"
    nounElement="/Attributes" type="UserData" key="true"/> 
    

The URL parameter configuration for a specific URL parameter name defines the values that correspond to a particular element 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:

NounDefinitions lists the nouns (and parts) for a service module. Here is marketing as an example:

<_config:NounDefinitions> 
<_config:Noun name="Campaign"/> 
<_config:Noun name="Activity"> 
<_config:NounElement name="CampaignElement" part="true"/> 
</_config:Noun> 
<_config:Noun name="MarketingEmailTemplate"/> 
<_config:Noun name="MarketingContent"> 
<_config:NounElement name="MarketingContentDescription" part="true"/> 
<_config:NounElement name="Attachment" part="true"/> 
</_config:Noun> 
</_config:NounDefinitions> 

Campaign is a noun with no parts. Activity is a noun with one part, CampaignElement.

The _Config:URLDefinitions links URL parameter names from the Management Center with the WebSphere Commerce nouns. The following snippet matches the Activity noun (shown in the preceding example) with the CampaignElement noun part.

<_config:URLDefinitions>
<_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" />
<_config:URLParameter name="enddate" nounElement="/EndDate" />
<_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="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="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:URLParameter name="x_" nounElement="/UserData/UserDataField" type="UserData" />
</_config:URLParameterGroup>

The class com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentActionMapping defined in the Struts actions in the Web application transfers objects between the Management Center and WebSphere Commerce nouns.

For example:

<action path="/CreateCatalogEntryExtraProperties" parameter="CatalogEntry" 
type="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentAction" 
className="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentActionMapping">  
<set-property property="contextParameters" value="storeId,langId" /> 
 
<set-property property="verb" value="Change" /> 
 
<set-property property="documentRootFactory" value="com.ibm.commerce.catalog.facade.datatypes.CatalogFactory" /> 
 
<set-property property="clientLibrary" value="com.ibm.commerce.catalog.facade.client.CatalogFacadeClient" /> 
 
<set-property property="clientLibraryMethod" value="changeCatalogEntry" /> 
 
<set-property property="actionCode" value="Change" /> 
 
</action>

Related reference

Transforming URL requests into Process BODs

Transforming URL requests into Change BODs


+

Search Tips   |   Advanced Search