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
Example
<_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>