CoreMedia DXP 8 requires additional REST handlers and some configuration of existing handlers.
Adding New REST Handlers
CoreMedia LiveContext API comes with additional REST handlers in order to make more data accessible and to provide additional data
processing capabilities. The handler classes reside in the WebSphereCommerceServerExtensionsLogic
module.
You have to add the following handlers:
- LanguageMapHandler
The
LanguageMapHandler
returns a list of all available languages of the WebSphere Commerce Server with its mapping on the internal language identifier which is used for certain REST calls.- StoreInfoHandler
The
StoreInfoHandler
returns the storeId and the catalog information of all available stores in the WebSphere Commerce Server.- CacheInvalidationHandler
The
CacheInvalidationHandler
returns invalidation events from the CACHEIVL table (see also Section 3.4.13, “Event-based Commerce Cache Invalidation”).- WorkspacesHandler
The
WorkspacesHandler
is used to display available commerce workspaces in studio.
Note | |
---|---|
The following handler is only necessary for content-led integration. |
- ResetPasswordHandler
The
ResetPasswordHandler
is used to update the users passwords. This handler is only necessary for content-led integration with IBM WCS (FEP7)
In order to add the handlers proceed as follows:
Add the CoreMedia LiveContext library package to the
Rest
module in your commerce development workspace.Add the following fully qualified names of the handlers to the file
WCDE-INSTALL/workspace/Rest/WebContent/WEB-INF/config/resources-ext.properties
accordingly to the CoreMedia LiveContext 2.0 WebSphere Commerce Project Workspace archive.Add a resource element for each handler to the file
WCDE-INSTALL/workspace/Rest/WebContent/WEB-INF/config/com.ibm.commerce.rest-ext/wc-rest-resourceconfig.xml
accordingly to the CoreMedia LiveContext 2.0 WebSphere Commerce Project Workspace archive.For the CacheInvalidationHandler add the file
WCDE-INSTALL/workspace/WC/xml/config/com.ibm.commerce.catalog-ext/wc-query-CoreMedia-LiveContext.tpl
from the the CoreMedia LiveContext 2.0 WebSphere Commerce Project Workspace archive. The file contains a database template to access IBM WCS CACHEIVL table.Adapt all
dbtype
properties to your target database.