This chapter describes configurations used in Social. It consists of the following main sections:

  • Components

    Description of the services which provide low-level functionality for UI components, including:

    • SpaceService

    • LifeCycleCompletionService

    • RestPortalContainerNameConfig

    • LinkProvider

  • External component plugins

    Usage, sample configurations and its details of the main component plugins used in Social, including:

    • ActivityResourceBundlePlugin

    • IdentityProviderPlugin

    • MentionsProcessor

    • OSHtmlSanitizerProcessor

    • PortletPreferenceRequiredPlugin

    • SpaceApplicationConfigPlugin

    • SocialChromatticLifeCycle

    • TemplateParamsProcessor

    • URLConverterFilterPlugin

    • and RestPortalContainerNameConfig

  • SpaceService

    This service is used for spaces management, including creating spaces, and installing applications.

  • LifeCycleCompletionService

    This component is used to process the callable request out of the HTTP request.

  • RestPortalContainerNameConfig

    This plugin is used to set the portal container name used for REST service.

  • LinkProvider

    This service is used to provide the utility to get the URLs of the activities, profiles, spaces, avatars and more.

Note

This section describes services which provide low-level functionality for UI components.

See also

Note

This section only describes the main component plugins used in Social. Each part supplies an sample configuration with the explanation about init-params so you can know how to use these plugins.

See also

This plugin is used to register the external resource bundle for the internationalized activity type.

Sample configuration:


<component-plugin>
  <name>exosocial:spaces</name> <!-- activity type -->
  <set-method>addActivityResourceBundlePlugin</set-method>
  <type>org.exoplatform.social.core.processor.ActivityResourceBundlePlugin</type>
  <init-params>
    <object-param>
      <name>locale.social.Core</name> <!-- resource bundle key file -->
      <description>activity key type resource bundle mapping for exosocial:spaces</description>
      <object type="org.exoplatform.social.core.processor.ActivityResourceBundlePlugin">
        <field name="activityKeyTypeMapping">
          <map type="java.util.HashMap">
            <entry>
              <key><string>space_created</string></key>
              <value><string>SpaceActivityPublisher.space_created</string></value>
            </entry>
            <entry>
              <key><string>manager_role_granted</string></key>
              <value><string>SpaceActivityPublisher.manager_role_granted</string></value>
            </entry>
            <entry>
              <key><string>user_joined</string></key>
              <value><string>SpaceActivityPublisher.user_joined</string></value>
            </entry>
            <entry>
              <key><string>member_left</string></key>
              <value><string>SpaceActivityPublisher.member_left</string></value>
            </entry>
          </map>
        </field>
      </object>
    </object-param>
  </init-params>
</component-plugin>

In which:

Object-param Description
locale.social.Core The resource bundle key file.

This plugin is used to configure the default applications when creating a new space.

Sample configuration:


<component-plugin>
  <name>Space Application Configuration</name>
  <set-method>setSpaceApplicationConfigPlugin</set-method>
  <type>org.exoplatform.social.core.space.SpaceApplicationConfigPlugin</type>
  <init-params>
    <object-param>
      <name>spaceHomeApplication</name>
      <description>Space Home Application</description>
      <object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
        <field name="portletApp"><string>social-portlet</string></field>
        <field name="portletName"><string>SpaceActivityStreamPortlet</string></field>
        <field name="appTitle"><string>Home</string></field>
        <!--<field name="icon"><string>SpaceHomeIcon</string></field>-->
      </object>
    </object-param>

    <object-param>
      <name>spaceApplicationListConfig</name>
      <description>space application list configuration</description>
      <object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin">
        <field name="spaceApplicationList">
          <collection type="java.util.ArrayList">
            <value>
              <object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
                <field name="portletApp"><string>dashboard</string></field>
                <field name="portletName"><string>DashboardPortlet</string></field>
                <field name="appTitle"><string>Dashboard</string></field>
                <field name="removable"><boolean>true</boolean></field>
                <field name="order"><int>1</int></field>
                <field name="uri"><string>dashboard</string></field>
                <!--<field name="icon"><string>SpaceDashboardIcon</string></field>-->
              </object>
            </value>
            <value>
              <object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
                <field name="portletApp"><string>social-portlet</string></field>
                <field name="portletName"><string>SpaceSettingPortlet</string></field>
                <field name="appTitle"><string>Space Settings</string></field>
                <field name="removable"><boolean>false</boolean></field>
                <field name="order"><int>2</int></field>
                <field name="uri"><string>settings</string></field>
                <!--<field name="icon"><string>SpaceSettingsIcon</string></field>-->
              </object>
            </value>
            <value>
              <object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
                <field name="portletApp"><string>social-portlet</string></field>
                <field name="portletName"><string>MembersPortlet</string></field>
                <field name="appTitle"><string>Members</string></field>
                <field name="removable"><boolean>true</boolean></field>
                <field name="order"><int>3</int></field>
                <field name="uri"><string>members</string></field>
                <!--<field name="icon"><string>SpaceMembersIcon</string></field>-->
              </object>
            </value>
          </collection>
        </field>
      </object>
    </object-param>
  </init-params>
</component-plugin>

In which:

Object-param Description
spaceHomeApplication Set the Application portlet to be the home page of a space.
spaceApplicationListConfig The list of the applications that are installed by default to a new space.
Field name Possible value Description
portletAp string The .war name file which has the portlet.
portletName string The name of portlet which is registered in the system.
appTitle string The display name of the application.
removable boolean Specify if the application is removed from the space or not.
order integer The order of the application in the space navigation.
uri string The URI of the application in the page node.
icon string The icon of the application.

This plugin is used to manage ChromatticSession in the Social project.

To use the plugin in the component configuration, you must use the following target-component:

Sample configuration:


<component-plugin>
  <name>chromattic</name>
  <set-method>addLifeCycle</set-method>
  <type>org.exoplatform.social.common.lifecycle.SocialChromatticLifeCycle</type>
  <init-params>
    <value-param>
      <name>domain-name</name>
      <value>soc</value>
    </value-param>
    <value-param>
      <name>workspace-name</name>
      <value>social</value>
    </value-param>
    <value-param profiles="all,default,minimal">
      <name>workspace-name</name>
      <value>social</value>
    </value-param>
    <values-param>
      <name>entities</name>
      <value>org.exoplatform.social.core.chromattic.entity.ProviderRootEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ProviderEntity</value>

      <value>org.exoplatform.social.core.chromattic.entity.IdentityEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ProfileEntity</value>

      <value>org.exoplatform.social.core.chromattic.entity.RelationshipEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.RelationshipListEntity</value>

      <value>org.exoplatform.social.core.chromattic.entity.ActivityEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ActivityListEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ActivityDayEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ActivityMonthEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ActivityYearEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.ActivityParameters</value>

      <value>org.exoplatform.social.core.chromattic.entity.SpaceRootEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.SpaceEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.SpaceListEntity</value>
      <value>org.exoplatform.social.core.chromattic.entity.SpaceRef</value>
    </values-param>
    <properties-param>
      <name>options</name>
      <property name="org.chromattic.api.Option.root_node.path" value="/production"/>
      <property name="org.chromattic.api.Option.root_node.create" value="true"/>
    </properties-param>
  </init-params>
</component-plugin>

In which:

Value-param Possible value Description
domain-name String The life cycle domain name.
workspace-name String The repository workspace name that is associated with this life cycle.
entities List<String> The list of chromatic entities that will be registered against the chromatic builder.

Properties-param: option

Property name Possible value Default value Description
org.chromattic.api.Option.rootnode.path String /production The path of the root node.
org.chromattic.api.Option.rootnode.create Boolean true Specify whether or not the root node is created by the ROOT_NODE_PATH option when it does not exist.
Copyright © 2009-2012. All rights reserved. eXo Platform SAS