Deprecated feature

Reusing an access profile under a different alias

You can reuse an access profile that is registered in the configuration of the data service layer as different access profiles supported by the Get service. You can do this by using access profile aliasing.

About this task

Create an access profile for authoring purposes and use the InsertMoreData command to populate additional data. However, this access profile might return the same data as another access profile that is used for the storefront. In this case, it is easier to configure the data service layer with an access profile and only maintain that one access profile and alias other access profiles to reuse it. The result of this aliasing is that the data service layer uses this one access profile to retrieve the data, and the business logic represents the request as an entirely different Get request. This aliasing technique can also be used to extend the access profile definition within the data service layer, and update the alias to use a new access profile instead of the existing access profile.

Access profile aliasing uses the value mapping foundation service which is configured in the wc-component.xml of the service module. By registering a value mapping with an external name of NounNameAccessProfile, the external access profile uses the internal value when calling the data service layer. If no mapping is registered for the access profile, then the access profile for the Get request is used when the data service layer is called.

To create an access profile alias:

Procedure

  1. If the service module is provided by IBM, open the workspace_dir\WC\xml\config\servicemodulepackagename-ext\wc-component.xml file in an XML editor. If the service module is a custom service module, open the wc-component.xml in the service module configuration directory.
  2. Locate the value mapping service configuration element. If the element does not exist, create it.
    <_config:valuemappingservice>
    
  3. Locate the <_config:valuemapping> element that has an external name of NounNameAccessProfile, where NounName is the name of the noun, for example CatalogEntry. If no valuemapping element exists for this external name, create one.
    <_config:valuemapping externalName="CatalogEntryAccessProfile" internalName="CatalogEntryAccessProfile">
  4. In the <_config:valuemapping> element, create one or more new <_config:valuemap> elements. The externalValue attribute is the access profile that is in the Get service and the internalValue attribute is the alias to use when calling the data service layer.
    			<_config:valuemap externalValue="IBM_Admin_Details" internalValue="IBM_Admin_Details"/>
    			<_config:valuemap externalValue="IBM_Admin_Summary" internalValue="IBM_Admin_Summary"/>
    
    Note: IBM_Admin_ prefixes all services intended to be used by admin/CMC based services calls. Access profiles which do not follow the new naming conventions continue to function correctly, as compatibility is maintained with earlier versions. It is recommended, however, that they are followed for existing access profiles, and when making changes to future access profiles.
  5. Save the file.

Example

As an example of defining access profile aliases, the following configuration defines aliases for GetCatalogEntry services so the same store front access profiles are used to populate Authoring requests.
<_config:valuemappingservice>
		<_config:valuemapping externalName="CatalogEntryAccessProfile" internalName="CatalogEntryAccessProfile">
			<_config:valuemap externalValue="IBM_Admin_Details" internalValue="IBM_Admin_Details"/>
			<_config:valuemap externalValue="IBM_Admin_Summary" internalValue="IBM_Admin_Summary"/>
		</_config:valuemapping>
</_config:valuemappingservice>