eXo Platform 3.0

- Prev
- Next

## Chapter 2. Configuration

## RelationshipManager

The Service is used to manipulate user relationships.

## SpaceIdentityProvider

The provider is to give identity space instances.

## SpaceApplicationHandler

The service is to handle all events related to creating and managing all the application spaces.

## ExoPeopleService

The service is to manipulate all data related to people in the Portal.

## Space Service

### Description

The service for spaces management includes creating spaces, and installing applications.

### Components configuration

Component name | Description
--- | ---
SpaceServiceImpl | Implementation class of Space Service.

    <component>
        <key>org.exoplatform.social.core.space.spi.SpaceService</key>
        <type>org.exoplatform.social.core.space.impl.SpaceServiceImpl</type>
        <init-params>
          <!-- Configure the applications to install in a space -->
          <values-param>
            <name>space.homeNodeApp</name>
            <value>SpaceActivityStreamPortlet</value>
          </values-param>
          <!-- Configure removable application or not <value>Application:removable</value> -->
          <values-param>
            <name>space.apps</name>
            <value>DashboardPortlet:true</value>
            <value>SpaceSettingPortlet:false</value>
            <value>MembersPortlet:true</value>
          </values-param>
        </init-params>
      </component>

Configuration name | Data Type | Possible value | Default Value | Description
--- | --- | --- | --- | ---
SpaceActivityStreamPortlet | `String` | N/A | `SpaceActivityStreamPortlet` | The name of portlet displaying activities of spaces
space.apps | `String list` | `Porlets' name: true/false` | `DashboardPortlet:true`; `SpaceSettingPortlet:false`; `MembersPortlet:true` | The list of configurations for portlets used as portlet applications.

### External plug-in configuration

     <external-component-plugins>
        <target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
        <component-plugin>
          <name>portlets.prefs.required</name>
          <set-method>setPortletsPrefsRequired</set-method>
          <type>org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin</type>
    	    <init-params>
    	      <values-param>
    	        <name>portletsPrefsRequired</name>
    	        <value>SpaceActivityStreamPortlet</value>
    	        <value>SpaceSettingPortlet</value>
    	        <value>MembersPortlet</value>
    	      </values-param>
    	    </init-params>
        </component-plugin>
      </external-component-plugins>

In which:

Name | Set-method | Type | Description
--- | --- | --- | ---
PortletPreferenceRequiredPlugin | setPortletsPrefsRequired | org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin | Configure the list of portlet names which will have portlet preference of space context.

- Init-params:

Name | Possible value | Default Value | Description
--- | --- | --- | ---
portletsPrefsRequired | `Portlet names` | `SpaceActivityStreamPortlet; SpaceSettingPortlet; MembersPortlet` | List of portlets which need to be saved and get the space context name.

## Activity Manager

### Description

The service is to manipulate space and user activities.

### Component plug-in configuration

    Exception occured, see logs

In which,

Name | Set-method | Type | Description
--- | --- | --- | ---
OSHtmlSanitizerProcessor | addProcessorPlugin | org.exoplatform.social.core.processor.OSHtmlSanitizerProcessor | The plugin that renders valid html tags appearing in the Activity body (content).

- Init-params:

Name | Possible value | Default Value | Description
--- | --- | --- | ---
allowedTags | `html tags` | b, i, a, span, em, strong, p, ol, ul,li, br, img | To process and render html tags in the activity content (body).

### External plug-in configuration

    <external-component-plugins>
        <target-component>org.exoplatform.social.core.manager.ActivityManager</target-component>
        <component-plugin>
          <name>MentionsProcessor</name>
          <set-method>addProcessorPlugin</set-method>
          <type>org.exoplatform.social.core.processor.MentionsProcessor</type>
          <init-params>
            <value-param>
              <name>priority</name>
              <description>priority of this processor (lower number will be executed first)</description>
              <value>2</value>
            </value-param>
          </init-params>
        </component-plugin>
    </external-component-plugins>

In which:

Name | Set-method | Type | Description
--- | --- | --- | ---
MentionsProcessor | addProcessorPlugin | org.exoplatform.social.core.processor.MentionsProcessor | A processor that substitutes @username expressions by a link on the user profile.

- Init-params:

Name | Possible value | Default Value | Description
--- | --- | --- | ---
priority | `priority number` | 2 | Priority of this processor (The lower level will be executed first).

## Identity Manager

### Description

The service is to manipulate the identity operations like creating, getting, deleting or finding a profile.

### Component plug-in configuration

    <component>
        <key>org.exoplatform.social.core.manager.IdentityManager</key>
        <type>org.exoplatform.social.core.manager.IdentityManager</type>
        <component-plugins>
          <component-plugin>
            <name>SpaceIdentityProvider plugin</name>
            <set-method>registerIdentityProviders</set-method>
            <type>org.exoplatform.social.core.identity.IdentityProviderPlugin</type>
            <init-params>
              <values-param>
              <name>providers</name>
                <description>Identity Providers</description>
                <value>org.exoplatform.social.core.identity.provider.SpaceIdentityProvider</value>
              </values-param>
            </init-params>
          </component-plugin>
        </component-plugins>
      </component>

In which:

Name | Set-method | Type | Description
--- | --- | --- | ---
SpaceIdentityProvider | registerIdentityProviders | org.exoplatform.social.core.identity.IdentityProviderPlugin | The plugin that provides identity for a space

- Init-params:

Name | Possible value | Default Value | Description
--- | --- | --- | ---
providers | `Every other identity providers` | `org.exoplatform.social.core.identity.provider.SpaceIdentityProvider` | Identity Provider instances for managing identities.

## Spaces Template configuration

In the eXo Spaces, we may have two space types (classic and webos spaces). This is for the classic mode (it's the only one implemented now).

For the classic space, we can pre-configure the template, meaning that you can set up where your menu will be displayed or where your application will be displayed.

Here is an example of configuration file that displays the menu on the left. The Application will be inserted in the container with the id Application:

    <page>
      <owner-type/>
      <owner-id/>
      <name/>
      <container id="SpacePage" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
        <container id="Menu" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
          <portlet-application>
            <portlet>
              <application-ref>space</application-ref>
              <portlet-ref>SpaceMenuPortlet</portlet-ref>
            </portlet>
            <access-permissions>*:/platform/users</access-permissions>
            <show-info-bar>false</show-info-bar>
          </portlet-application>
        </container>
        <container id="Application" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
        </container>
      </container>
    </page>

In this example, the outer container contains two inner containers: one container has id as Menu for your Menu and another has id as Application containing your applications.

If you want to put your menu in right and your application in left, you can swap the declared position of two containers:

    <page>
      <owner-type/>
      <owner-id/>
      <name/>
      <container id="SpacePage" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
        <container id="Application" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
        <container id="Menu" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
          <portlet-application>
            <portlet>
              <application-ref>space</application-ref>
              <portlet-ref>SpaceMenuPortlet</portlet-ref>
            </portlet>
            <access-permissions>*:/platform/users</access-permissions>
            <show-info-bar>false</show-info-bar>
          </portlet-application>
        </container>
        </container>
      </container>
    </page>

Here is the configure file in FishEye: http://fisheye.exoplatform.org/browse/social/trunk/extension/war/src/main/webapp/WEB-INF/conf/portal/template/pages/space/page.xml.

In your tomcat, this configuration file is at $EXOTOMCAT/webapps/social-ext/WEB-INF/conf/portal/template/pages/space/page.xml.

## Configure the oauth 2 legged scenario

This is to explain how to configure the oAuth 2 legs scenario in openSocial.

For more information about this, visit the website: great article

### Generate the certificates

To generate the key:

    $ openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem
         -out testkey.pem -subj '/CN=mytestkey'
    $ openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM

### Configure the property file

Edit container.js and change the following parameter to point to your private key and your key name.

    "gadgets.signingKeyFile" : "oauth.pem",
    "gadgets.signingKeyName" : "oauthKey",

- Prev
- Up
- Home
- Next