Samples > Starter stores > Starter store enhancements > Social Commerce > WebSphere Commerce Dojo Enhancements API > Social Commerce services


Create new service adapters

Social Commerce is delivered as a set of WebSphere sMash modules that provide a REST API interface which is called by the social content widgets. An adapter is a WebSphere sMash module that implements the Social Commerce Service Adapter API.

To develop a new adapter for a service provider, create a new WebSphere sMash module.


Before you begin

Set up the development environment for WebSphere Commerce sMash:

  1. Install the sMash Eclipse plug-in. For more information about installing this plug-in, see the IBM WebSphere Commerce sMash Getting Started Guide.

  2. Start WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  3. Select Window > Preferences to open the Preferences window.

  4. In the left pane, click WebSphere sMash to open the WebSphere Commerce sMash preference page.

  5. In the Zero home field, type the full path of the location where the sMash application runtime SocCore project is stored. For example, workspace directory/SocCore.


Procedure

  1. In the Enterprise Explorer view, select New > Other > WebSphere sMash > WebSphere sMash Application from the File menu.

  2. Specify a name for the project to add the new service provider adapter code to. For example, specify com.acme.FSBlogAdapter for a project that contains the code for a new Blog Service Adapter.

  3. Expand project name > config and open the ivy.xml file.

  4. In the ivy.xml file, use the organization field to specify the organization that owns the adapter. For example, com.acme.

  5. Save and close the file.

  6. Click the Dependencies tab and click the Add button in the upper right hand corner to open the Dependency Selection dialog.

  7. From the list of dependencies, click com.ibm.commerce.soccom.adapter to add a dependency on this project that includes the service adapter interfaces.

  8. Add the Java classes and code to implement the service adapter interface in the java folder of the new project. For example, SocApp/java. Since the class path for the added dependency is automatically set, you can automatically reference the Java interface or helper classes from the dependencies.


Related tasks

Implement the Service Adapter API for new service providers

Related reference

REST API


+

Search Tips   |   Advanced Search