Samples > Starter stores > Starter store enhancements > Social Commerce > WebSphere Commerce Dojo Enhancements API > Social Commerce services > Implement the Service Adapter API for new service providers > Add support for new service adapters


Configure capability settings

Since the implementations of different service provider adapters contain different features and behaviors, the social content widgets must be able to adjust to reflect the features and behaviors of the service provider that is being used. The capability system allows the social content widgets to access the characteristics of the service providers at runtime and display a custom appearance that is based on the configuration of the service provider adapter.

The default set of capabilities are provided in the com.ibm.commerce.soccom.handler/config/zero.config file. These capabilities control the behavior of the Blog and PhotoGallery widgets, such as sorting options and the REST control length limit for inputs. The last word in the capability name provides a description of the capability. For example, the name of the itemModeSortByTime capability indicates that when set to true, this capability sort items (such as blog entries) by time.


Before you begin

Review the API documentation for the following Java interfaces within the Social Commerce Service Adapter API:


Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. In the Enterprise Explorer view, expand SocApp > config.

  3. In the adapter.config file, override the default values with the values that to apply to the social content widgets. The following code snippet shows the default values provided in the adapter.config file:

    /config/soccom/default/capabilities/blog/itemModeSortByTime = false
    /config/soccom/default/capabilities/blog/itemModeSortByComments = false
    /config/soccom/default/capabilities/blog/itemModeSortByRecommendations = false
    /config/soccom/default/capabilities/blog/userModeSortByTime = false
    /config/soccom/default/capabilities/blog/userModeSortByComments = false
    /config/soccom/default/capabilities/blog/userModeSortByRecommendations = false
    /config/soccom/default/capabilities/blog/titleMaxLength = 60
    /config/soccom/default/capabilities/blog/entryMaxLength = 4096
    /config/soccom/default/capabilities/blog/commentMaxLength = 1024
    
    /config/soccom/default/capabilities/photoGallery/itemModeSortByTime = false
    /config/soccom/default/capabilities/photoGallery/itemModeSortByComments = false
    /config/soccom/default/capabilities/photoGallery/itemModeSortByRecommendations = false
    /config/soccom/default/capabilities/photoGallery/userModeSortByTime = false
    /config/soccom/default/capabilities/photoGallery/userModeSortByComments = false
    /config/soccom/default/capabilities/photoGallery/userModeSortByRecommendations = false
    /config/soccom/default/capabilities/photoGallery/titleMaxLength = 60
    /config/soccom/default/capabilities/photoGallery/entryMaxLength = 4096
    /config/soccom/default/capabilities/photoGallery/commentMaxLength = 1024
    
    /config/soccom/default/capabilities/profile/maxFileSize = ""
    /config/soccom/default/capabilities/profile/imageFileTypes = ""
    

  4. To avoid conflicts with the settings used for other service provider implementations, replace instances of default with the name of the new service provider. For example, in the Pluck service provider implementation, the default string is replaced with pluck to indicate that these capability settings apply to Pluck profiles:

    /config/soccom/pluck/capabilities/blog/itemModeSortByTime = true
    /config/soccom/pluck/capabilities/photoGallery/itemModeSortByTime = true
    

  5. Save the changes to the file.


What to do next

Deploy your changes to the production environment.


Related tasks

Configure profile details


+

Search Tips   |   Advanced Search