Infrastructure: OnlineStore Noun

The OnlineStore noun is used to model a WebSphere Commerce store.

For each service call, three validation steps are performed:

  • If the "_wcf.usage" parameter is provided, validate that it has access to the related store type.
  • Validate that the current user role has access to the store type of the store being returned.
  • Validate that the current user has the correct access control policy to call the underlying commands that collect store information.
  • The "_wcf.usage" parameter conveys how much information is needed by the client application. An access control check for the user is performed based on the underlying command called depending on the "usage" parameter provided. If the user is not allowed to call a command returning store information, this store information will not be returned. If the "usage" parameter is not specified, the access control check for the user is not performed. The predefined usage parameter values for the Management Center are:

    A customized tool can be created and added to the Management Center. If users of the new tool can access any store (without access control), the usage keyword cannot be specified in the request. If access control is needed, a new usage keyword must be defined and this component must be configured in order to work with the usage keywords. To do so, a new customized wc-component.xml file (refer to the sample under section "UML Diagram") should be created in the following directory:

    WC_eardir/xml/config/com.ibm.commerce.infrastructure-ext

    Here is the sample content:

    <?xml version="1.0" encoding="ISO-8859-1"?> <_config:DevelopmentComponentConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config" xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd "> <_config:valuemappingservice> <_config:valuemapping externalName="StoreType" internalName="StoreType"> <!-- Map tool type to STORE.STORETYPE in database --> <_config:valuemap externalValue="MyCompany_ToolA" internalValue="B2C,B2B" /> </_config:valuemapping> <_config:valuemapping externalName="RoleType" internalName="RoleType"> <!-- Map tool type to ROLE.ROLE_ID in database --> <_config:valuemap externalValue="B2C" internalValue="-9,-4,-8,-16,-13,-1" /> </_config:valuemapping> </_config:valuemappingservice> </_config:DevelopmentComponentConfiguration>

    The first valuemapping tag specifies that the tool named, MyCompany_ToolA (any string represents the new tool), can only access stores of store types B2C and B2B. Any store to be returned by this component service for this new tool must satisfy this rule.

    The second optional valueamapping tag specifies that only users of roles with role IDs (in ROLES database table) -9, -4, -8, -16, -13 and -1 can access any stores of store type B2C. Since this rule of external value "B2C" exists in the original file, the new internal values will override the original rule and it applies to all requests from all tools using this component service. It is recommended that the existing role IDs from the original configuration file are copied over to this new file before adding or removing roles for a store type.

    Default rules are pre-defined in the following file:

    WC_eardir/xml/config/com.ibm.commerce.infrastructure/wc-component.xml

    The pre-defined rules can be overridden by adding the same rule with different internalValue in the customized file.

    In addition to the aforementioned rules, access control policies must be loaded. Here are two sample access control user group and policy files. Thess files should be located at the following directory: WC_installdir/xml/policies/xml

    ToolA_ACUserGroups_en_US.xml - This file is loaded with acugload utility.

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE UserGroups SYSTEM "../dtd/ACUserGroups.dtd"> <!-- ================================================================= Licensed Materials - Property of IBM WebSphere Commerce (C) Copyright IBM Corp. 2008, 2011 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. ================================================================= --> <UserGroups LanguageID="en_US"> <UserGroup Name="ToolAGroupViewersForOrg" OwnerID="RootOrganization" Description="Users who can display tool A group entries for the organization" > <UserCondition><![CDATA[ <profile> <orListCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Buyer (sell-side)"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Category Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Product Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Seller"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Marketing Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Sales Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Logistics Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Account Representative"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> </orListCondition> </profile> ]].></UserCondition> </UserGroup> </UserGroups>

    ToolA_AccessControlPolicies.xml - This policy file is loaded using acpload utility.

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE Policies SYSTEM "../dtd/accesscontrolpolicies.dtd"> <Policies> <Action Name="MyCompany_ToolA" CommandName="MyCompany_ToolA"> </Action> <ResourceCategory Name="com.ibm.commerce.common.objects.StoreEntityResourceCategory" ResourceBeanClass="com.ibm.commerce.common.objects.StoreEntity" PrimaryResourceTable="STOREENT" PrimaryResourceOwnerTable="STOREENT" PrimaryResourceOwnerColumn="MEMBER_ID"> <ResourceAction Name="MyCompany_ToolA"/> </ResourceCategory> <!-- end com.ibm.commerce.common.objects.StoreEntityResourceCategory --> <ActionGroup Name="MyCompany_ToolA" OwnerID="RootOrganization"> <ActionGroupAction Name="MyCompany_ToolA"/> </ActionGroup> <Policy Name="ToolAUsersForOrgExecuteCatalogToolActionsOnStoreEntityResource" OwnerID="RootOrganization" UserGroup="ToolAGroupViewersForOrg" ActionGroupName="MyCompany_ToolA" ResourceGroupName="StoreEntityDataResourceGroup" PolicyType="groupableTemplate"> </Policy> <PolicyGroup Name="ManagementAndAdministrationPolicyGroup" OwnerID="RootOrganization"> <PolicyGroupPolicy Name="ToolAUsersForOrgExecuteToolAActionsOnStoreEntityResource" PolicyOwnerID="RootOrganization" /> </PolicyGroup> </Policies>

    For more details about how to create an access control policy XML file and load it into the database, please refer to the following link:
    http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/tasks/taxloadextractpol.htm

    BOD Summary

    Access Profile and Expression Builder columns are for Get BOD only.
    BOD Action Code / Access Profile Action Expression Service Provided Sample XML Message Client Library / Expression Builder
    GetOnlineStore {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore This query will find all stores where the current user has the ability to perform the specified right. For example, the query to return the online stores where the current user can manage the online stores' catalog would be as follows:
    [_wcf.ap=IBM_Admin_Summary;_wcf.usage="IBM_CatalogTool"]/OnlineStore
    SummaryRequest
    SummaryResponse

    DetailsRequest
    DetailsResponse

    AllRequest
    AllResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / findAll
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[(UniqueID='$storeId$')]] The XPath will find the store with the specified internal store ID found at STOREENT.STOREENT_ID. SummaryRequest
    SummaryResponse

    DetailsRequest
    DetailsResponse

    AllRequest
    AllResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / findByUniqueID
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(NameIdentifier='$storeName$')]]] The XPath will find the store with the exact name specified in the query for the current user with the specified usage. SummaryRequest
    SummaryResponse

    DetailsRequest
    DetailsResponse

    AllRequest
    AllResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / N/A
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(contains(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name containing the string specified in the query for the current user with the specified usage.

    If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.
    SummaryRequest
    SummaryResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / N/A
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(starts-with(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name starting with the string specified in the query for the current user with the specified usage.

    If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.
    SummaryRequest
    SummaryResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / N/A
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(ends-with(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name ending with the string specified in the query for the current user with the specified usage.

    If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.
    SummaryRequest
    SummaryResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / N/A
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(StoreIdentifier/ExternalIdentifier/NameIdentifier='$storeName$')]
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(contains(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(starts-with(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
    {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(ends-with(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
    The XPath will find the store that has a name that exactly matches part of the string specified in the query for the current user with the specified usage. This search() syntax can be used by any LOB tools so that store name input like "abc*", "*abc*", "*abc" or "abc" can be converted to the corresponding XPath using SearchExpressionBuilder utility. SearchSummaryRequest
    SearchSummaryResponse

    SearchContainsSummaryRequest
    SearchContainsSummaryResponse

    SearchStartsSummaryRequest
    SearchStartsSummaryResponse

    SearchEndsSummaryRequest
    SearchEndsSummaryResponse

    InfrastructureFacadeClient.getOnlineStore(String,String) / findByName
    ProcessOnlineStore Open Opens a store. Request
    Response

    InfrastructureFacadeClient.openStore
    Close Closes a store. Request
    Response

    InfrastructureFacadeClient.closeStore
    ChangeOnlineStore Add /OnlineStore[1]/DefaultCatalog[1] Adds a new default catalog configuration to the store Request
    Response

    InfrastructureFacadeClient.addDefaultCatalog
    Change /OnlineStore[1]/DefaultCatalog[1] Updates default catalog configuration of the store. Currently, custom fields (Field1, Field2, and Field3) can be updated. Request
    Response

    InfrastructureFacadeClient.changeDefaultCatalog
    Delete /OnlineStore[1]/DefaultCatalog[1] Deletes an existng default catalog configuration of the store. Request
    Response

    InfrastructureFacadeClient.deleteDefaultCatalog

    Access Profile

    Some sample XML request and response web service messages are provided for each noun. These sample messages might not include all properties or attributes. To view a sample message that includes other properties or attributes, enable logging and tracing for the appropriate component and then call the web service to set or change the properties or attributes. Review the corresponding log file to see the request or response information.

    Access Profile Data Returned
    IBM_Admin_Summary
    • OnlineStoreIdentifier (StoreIdentifierType)
    • DefaultCatalog (DefaultCatalogType)
    Sample Summary Request
    Sample Summary Response

    IBM_Admin_Details
    • Everything from IBM_Admin_Summary access profile
    • OnlineStoreDescription (OnlineStoreDescriptionType)
    • State
    • StoreType
    • OnlineStoreSupportedCurrencies
    • OnlineStoreSupportedLanguages
    • DefaultCatalog
    Sample Detail Request
    Sample Detail Response

    IBM_Admin_All
    • Everything from IBM_Admin_Details access profile
    • OnlineStoreContactInfo
    • OnineStoreLocationInfo
    • OnineStoreRelatedStores
    • UserData

    XSD files