loading table of contents...

3.4.7. Configuring REST Handlers

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]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:

  1. Add the CoreMedia LiveContext library package to the Rest module in your commerce development workspace.

  2. 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.

  3. 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.

  4. 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.

  5. Adapt all dbtype properties to your target database.