Develop > Business logic layer
Workspaces support for BOD service modules
There are two user interfaces that use workspaces in WebSphere Commerce, WebSphere Commerce Accelerator, and Management Center. The Management Center uses Get services from BOD service modules to retrieve many of its business objects, and along with the business objects, change control metadata is also included in the response. The change control metadata is returned to the Management Center, where it is used to determine whether the object can be modified by the current user.
You can customize the aspects of the physical and logical layers of a BOD service module that are under change control, by enabling or disabling change control for nouns and noun parts. However, you cannot customize the Workspaces Administration Tool itself.
Support for data service layer tables
Workspaces are supported at the physical layer of a BOD service module by allowing you to specify what tables are part of a workspace using configuration changes. No Java needs to be written or modified to accomplish this configuration. As part of these configuration changes, you define a resource container, and managed resources within that container. The resource container is a uniquely identified container for the tables in the service module. Managed resources are the tables within the resource container.
You configure the resource containers and managed resources by assigning them a specific class that the data service layer provides for you. The classnames are com.ibm.commerce.context.content.resources.DSLResourceContainer and com.ibm.commerce.context.content.resources.DSLResourceManager. You will use these classes for all BOD service modules. Different classes can be used if you decide to write the own, non-workspace implementation of a change control solution.
You add support for a data service layer table or all of the tables in a BOD service module by following the steps in: Enable workspaces support for a custom table in an existing WebSphere Commerce BOD service module
Support for nouns and noun parts
Workspaces are supported at the logical layer of a BOD service module by allowing you to control what nouns and noun parts are under change control. You customize this change control by configuring the business object mediator – you do not need to write Java code to add change control to a noun or noun part.
You can customize the change control for nouns and noun parts by following the steps in:
Support for presenting change control information
Change control information, also called locking information, represents when a business object is modified, and the context information describing when the modification was made. This data is created when business objects are created, updated or deleted and is used to determine whether the current request can modify the business object.
Change control is passed to the presentation layer as part of the response to a service request. You can configure whether change control information is included for a noun by following the steps in: Include change control information in the response of a Get service.
A metadata tag to use on presentation layer pages has been provided to use on, for example, authoring views in the Management Center. Additionally, the structure and content of the change control metadata is presented in detail in Change control metadata structure for business objects.
- Use authoring access profiles with workspaces
Access profiles can be used to convey the intent of a query, and for workspaces, are used to indicate when a request is made for authoring or display purposes. This allows you to see and show additional metadata about the business objects when you are working in an authoring environment. Access profiles indicate the amount of data to retrieve about the business objects. This includes the information contained within the business object and additional metadata that can be associated with the object.
- Workspaces support and the Business Context Service
The Business Context Service supports workspaces by using the Content Context and Task Context business contexts. Business logic can determine the context of the current request, and retrieve the appropriate data, by using the Business Context Service.
- Change control metadata for business objects in workspaces
Change control metadata is created whenever an add, change, or delete occurs in the context of a workspace. This information is retrieved for display purposes when a Get request is performed for an authoring environment, such as the workspaces feature of the Management Center.
- Call a service with a workspace context from a Java based client or JUnit testcase
You can specify a workspace context when you call a WebSphere Commerce service from a Java based client, or a JUnit testcase.
- Business context service parameters for business object documents
Context data parameters have been provided to represent workspace, taskgroup and task. Additional context parameters permit the client to specify these additional context values on the service request. Similar to locale and storeId, clients of a service can indicate these additional authoring context variables in the request.
Related concepts
WebSphere Commerce BOD command framework
Related tasks
Enable workspaces support for a custom table in an existing WebSphere Commerce BOD service module
Enable change control for a noun
Enable change control for a noun part
Include change control information in the response of a Get service
Use workspaces in the Management Center