diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Gadgets.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Gadgets.wiki index acc24661b6..0ac2c4c84b 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Gadgets.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Gadgets.wiki @@ -1,21 +1,21 @@ -All Social Gadgets are in _opensocial.war_. +All the Social gadgets are in _opensocial.war_. h1. Activity Stream {anchor:id=SOCref.List_Of_Gadget_in_Social.ActivityStream} -* *Description*: Manages activities of users. Some kinds of activities such as: update status, like/unlike activities, comment activities, delete activities and delete comments. -* *Used REST services*: ActivitiesRestServices +* *Description*: Manage activities of users: update status, like/unlike activities, comment activities, delete activities and delete comments. +* *Used REST services*: ActivitiesRestServices. h1. Social RSS Reader {anchor:id=SOCref.List_Of_Gadget_in_Social.SocialRSSReader} -* *Description*: Fetches and parses RSS information from a specific url. -* *Description of user preferences*: The number of RSS per page is 10 by default. Get RSS from input URL (Default URL is http://blog.exoplatform.org/feed/). -* *Used REST services*: N/A +* *Description*: Fetch, parse and display RSS from a specific URL. +* *Description of user preferences*: There are 2 preference fields: URL input box (default value is [http://blog.exoplatform.org/feed/]) and Number of RSS per page selector (default value is 10). +* *Used REST services*: N/A. h1. My Connections {anchor:id=SOCref.List_Of_Gadget_in_Social.MyConnections} -* *Description*: Displays a viewer's information and his connections' information. -* *Description of user preferences*: Connections displayed per page. The number of connections displayed is 5 by default. -* *Used REST services*: N/A +* *Description*: Get and display information of the current viewer and his connections. +* *Description of user preferences*: The number of connections displayed per page. It is set to '5' by default. +* *Used REST services*: N/A. h1. My Spaces {anchor:id=SOCref.List_Of_Gadget_in_Social.MySpaces} -* *Description*: Displays all the spaces that a user has the "member" role. -* *Used REST services*: SpacesRestService +* *Description*: Display all spaces that a user has the "member" role. +* *Used REST services*: SpacesRestService. diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Portlets.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Portlets.wiki index 8b1b512d52..380c82219e 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Portlets.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/Application/List_of_Portlets.wiki @@ -1,39 +1,18 @@ -All the portlets are in _social-portlet.war_ - -|| Portlets name || Description || -| *SpaceMenuPortlet* | Display the menu on the right of a Space: Home, Dashboard, Members, SpaceSettings | -| *MembersPortlet* | Display MemberSpace where you can search for space members or list space members in alphabet | -| *SpaceSettingPortlet* | Shows the settings of Space: Settings, Visibility, Members, Application. You can change the setting information of a space if you are the creator of that space or have the manager right on it. | -| *MySpacesPortlet* | Displays your Space page where you can add new spaces, search for spaces or list spaces in alphabet | -| *InvitationSpacesPortlet* | Displays the *Space invitation* page where you can search for spaces, list spaces in alphabet and view all the Space invitations | -| *PendingSpacesPortlet* | Displays the *Space requests to join* page where you can search for spaces, list spaces in alphabet and view all the pending request to join Spaces | -| *PublicSpaces Portlet* | Displays the *Public Spaces* page where you can search for spaces, list spaces by alphabet and view all available public spaces to join | -| *SpaceActivityStreamPortlet* | Display spaces activities | -| *UserActivityStreamPortlet* | Update user's activities/status | -| *PeoplePortlet* | The People page where you can find people, display people name by alphabet | -| *ProfileNavigationPortlet* | | -| *ConnectionsPortlet* | The Conections page where you can access to your network, invitations to connect or connection requests | -| *InvitationsPortlet* | | -| *RequestsPortlet* | | -| *UserProfilePortlet* | Display user profile page where you can view/ edit user's basic information, contacts, experience or change avatar | -| *MyConnectionsNavigationPortlet* | | - - All the portlets are in the file _social-portlet.war_ || Portlet name || Description || -| *MembersPortlet* | To enable users to search for Space members or list Space members in the alphabet order. | -| *MySpacesPortlet* | To display the Space page where you can add new Spaces, search for Spaces or list Spaces in the alphabet order. | -| *SpaceActivityStreamPortlet* | To share Spaces activity information. | -| *InvitationsPortlet* | To list all people that invite users. | -| *RequestsPortlet* | To list all invitations that the user requests. | -| *InvitationSpaces Portlet* | To enable users to search for Spaces, and list spaces in the alphabet order and view all the Space invitations. | -| *PendingSpacePortlet* | To display the *Space requests to join* page where you can search for Spaces, list spaces in the alphabet order and view all the pending requests to join Spaces. | -| *PublicSpacesPortlet* | To display the *Public Spaces* page where you can search for Spaces, list Spaces in the alphabet order and view all available public Spaces to join. | -| *UserActivityStreamPortlet* | To update and share user's activities and/or status. | -| *People Portlet* | To display the People page where you can find people, display people names in the alphabet order. | -| *ConnectionsPortlet* | To display the Connections page where you can access your network, invitations to connect or connection requests. | -| *UserProfilePortlet* | To display the user profile page where users can view and/or edit basic information, contacts, experience or change their avatar. | +| *MembersPortlet* | Enable users to search for Space members or list Space members in the alphabet order. | +| *MySpacesPortlet* | Display the Space page where you can add new Spaces, search for Spaces or list Spaces in the alphabet order. | +| *SpaceActivityStreamPortlet* | Share Spaces activity information. | +| *InvitationsPortlet* | List all people that invite users. | +| *RequestsPortlet* | List all invitations that the user requests. | +| *InvitationSpaces Portlet* | Enable users to search for Spaces, and list spaces in the alphabet order and view all the Space invitations. | +| *PendingSpacePortlet* | Display the *Space requests to join* page where you can search for Spaces, list spaces in the alphabet order and view all the pending requests to join Spaces. | +| *PublicSpacesPortlet* | Display the *Public Spaces* page where you can search for Spaces, list Spaces in the alphabet order and view all available public Spaces to join. | +| *UserActivityStreamPortlet* | Update and share user's activities and/or status. | +| *People Portlet* | Display the People page where you can find people, display people names in the alphabet order. | +| *ConnectionsPortlet* | Display the *Connections* page where you can access your network, invitations to connect or connection requests. | +| *UserProfilePortlet* | Display the *UserProfile* page where users can view and/or edit basic information, contacts, experience or change their avatar. | diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuration.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuration.wiki index 9768c5c5fc..20d441d6fc 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuration.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuration.wiki @@ -5,8 +5,8 @@ h2. ActivityManager {anchor:id=SOCref.Configuration.Component.ActivityManager} h2. SpaceService {anchor:id=SOCref.Configuration.Component.SpaceService} || Configuration name || Data type || Default Value || Description || -| space.homeNodeApp | {{String}} | {{SpaceActivityStreamPortlet}} | The home application for a space | -| space.apps | {{String list}} | {{DashboardPortlet:true}}, {{SpaceSettingPortlet:false}}, {{MembersPortlet:true}} | The space applications | +| space.homeNodeApp | {{String}} | {{SpaceActivityStream Portlet}} | The home application for a space. | +| space.apps | {{String list}} | {{DashboardPortlet:true}}, {{SpaceSettingPortlet: false}}, {{MembersPortlet:true}} | The space applications. | {note} Deprecated: Use external-component-plugins instead: org.exoplatform.social.core.space.SpaceApplicationConfigPlugin @@ -14,42 +14,40 @@ Deprecated: Use external-component-plugins instead: org.exoplatform.social.core. h2. IdentityManager {anchor:id=SOCref.Configuration.Component.IdentityManager} || Configuration name || Data type || Default Value || Description || -| providers | {{String}} | {{org.exoplatform.social.core.identity.provider.SpaceIdentityProvider}} | | +| providers | {{String}} | {{org.exoplatform.social.core.identity.provider.SpaceIdentityProvider}} | The identity providers. | h2. ProfileConfig {anchor:id=SOCref.Configuration.Component.ProfileConfig} || Configuration name || Data type || Default Value || Description || -| nodetype.emails | {{String}} | {{exo:profileKeyValue}} | | -| nodetype.phones | {{String}} | {{exo:profileKeyValue}} | | -| nodetype.ims | {{String}} | {{exo:profileKeyValue}} | | -| nodetype.urls | {{String}} | {{exo:profileKeyValue}} | | -| nodetype.address | {{String}} | {{exo:profileAddress}} | | -| nodetype.experiences | {{String}} | {{exo:profileExperience}} | | -| nodetype.education | {{String}} | {{exo:profileEducation}} | | -| forceMultiValue | {{String}} | xxxxxxxxxxxx | | - +| nodetype.emails | {{String}} | {{exo:profileKeyValue}} |Define the node type which contains user email information of a profile. | +| nodetype.phones | {{String}} | {{exo:profileKeyValue}} | Define the node type which contains user phone information of a profile. | +| nodetype.ims | {{String}} | {{exo:profileKeyValue}} |Define the node type contains user IMS information of a profile. | +| nodetype.urls | {{String}} | {{exo:profileKeyValue}} | Define the node type which contains user URL of a profile. | +| nodetype.address | {{String}} | {{exo:profileAddress}} | Define the node type which contains user address information of a profile. | +| nodetype.experiences | {{String}} | {{exo:profileExperience}} |Define the node type which contains user working-experience information of a profile. | +| nodetype.education | {{String}} | {{exo:profileEducation}} |Define the node type which contains user education information of a profile. | h2. ServiceProviderStore {anchor:id=SOCref.Configuration.Component.ServiceProviderStore} || Configuration name || Data type || Default Value || Description || -| sample-provider | properties-params | | sample service provider | +| sample-provider | properties-params | N/A | Sample service provider. | h1. External component plugins {anchor:id=SOCref.Configuration.External_component_plugins} h2. MentionsProcessor {anchor:id=SOCref.Configuration.External_component_plugins.MentionsProcessor} || Configuration name || Data type || Default Value || Description || -| priority | {{String}} | 2 | priority of this processor (lower are executed first) | +| priority | {{String}} | 2 | Priority of this processor (lower are executed first). | h2. PortletPreferenceRequiredPlugin {anchor:id=SOCref.Configuration.External_component_plugins.PortletPrederenceRequiredPlugin} || Configuration name || Data type || Default Value || Description || -| portletsPrefsRequired | {{String list}} | {{SpaceActivityStreamPortlet, SpaceSettingPortlet, MembersPortlet}} | The portlet name which requires space URL preference| +| portletsPrefsRequired | {{String list}} | {{SpaceActivityStream Portlet, SpaceSettingPortlet, MembersPortlet}} | The portlet name which requires space URL preference.| h2. SpaceApplicationConfigPlugin {anchor:id=SOCref.Configuration.External_component_plugins.SpaceApplicationConfigPlugin} || Configuration name || Data type || Description || -| spaceHomeApplication | {{SpaceApplicationConfigPlugin$SpaceApplication}} | The space application for the space home node| -|spaceApplicationList| {{SpaceApplicationConfigPlugin}} |space application list configuration| +| spaceHomeApplication | {{SpaceApplicationConfigPlugin$S paceApplication}} | The space application for the space home node.| +|spaceApplicationList| {{SpaceApplicationConfigPlugin}} |Space application list configuration.| h2. AddNodeTypePlugin {anchor:id=SOCref.Configuration.External_component_plugins.AddNodeTypePlugin} || Configuration name || Data type || Default Value || Description || -| autoCreatedInNewRepository | {{String}} | {{jar:/conf/portal/core-nodetypes.xml}} | Node types configuration file | +| autoCreatedInNewRepository | {{String}} | {{jar:/conf/portal/ core-nodetypes.xml}} | Node types configuration file. | h1. RelationshipManager {anchor:id=SOCref.Configuration.RelationshipManager} The Service is used to manipulate user relationships. @@ -94,7 +92,7 @@ h2. Components configuration {anchor:id=SOCref.Configuration.SpaceService.Compon {code} || Configuration name || Data Type || Possible value || Default Value || Description || -| *SpaceActivityStreamPortlet* | {{String}} | N/A | {{SpaceActivityStreamPortlet}} | The name of portlet displaying activities of spaces | +| *SpaceActivityStreamPortlet* | {{String}} | N/A | {{SpaceActivityStream Portlet}} | 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. | h2. External plug-in configuration {anchor:id=SOCref.Configuration.SpaceService.ExternalPluginConfiguration} @@ -121,7 +119,7 @@ h3. PortletPreferenceRequiredPlugin {anchor:id=SOCref.Configuration.SpaceService 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. | +| *PortletPreference RequiredPlugin* | setPortletsPrefsRequired | org.exoplatform.social.core.application. PortletPreferenceRequiredPlugin | Configure the list of portlet names which will have portlet preference of space context. | * Init-params: @@ -130,7 +128,7 @@ In which: h3. SpaceApplicationConfigPlugin {anchor:id=SOCref.Configuration.SpaceService.ExternalPluginConfiguration.SpaceApplicationConfigPlugin} {note} -Since 1.1.3 +This plugin has been used since 1.1.3 {note} {code:xml} @@ -205,7 +203,7 @@ Since 1.1.3 In which: || Name || Set-method || Type || Description || -| *Space Application Configuration* | setSpaceApplicationConfigPlugin | org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin | Configure the list of space applications to be installed when creating a new space. | +| *Space Application Configuration* | setSpaceApplicationConfigPlugin | org.exoplatform.social.core. application.PortletPreferenceRequiredPlugin | Configure the list of space applications to be installed when creating a new space. | h1. Activity Manager {anchor:id=SOCref.Configuration.ActivityManager} @@ -244,12 +242,12 @@ h2. Component plug-in configuration {anchor:id=SOCref.Configuration.ActivityMana 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). | +| *OSHtmlSanitizer Processor* | 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). | +| *allowedTags* | {{html tags}} | b, i, a, span, em, strong, p, ol, ul,li, br, img | Process and render html tags in the activity content (body). | h2. External plug-in configuration {anchor:id=SOCref.Configuration.ActivityManager.ExternalPluginConfiguration} @@ -274,18 +272,18 @@ h2. External plug-in configuration {anchor:id=SOCref.Configuration.ActivityManag 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. | +| *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). | +| *priority* | {{priority number}} | 2 | The priority of this processor. The lower priority level is executed first. | h1. Identity Manager {anchor:id=SOCref.Configuration.IdentityManager} h2. Description {anchor:id=SOCref.Configuration.IdentityManager.Description} -The service is to manipulate the identity operations like creating, getting, deleting or finding a profile. +The service is used to manipulate the identity operations like creating, getting, deleting, or finding a profile. h2. Component plug-in configuration {anchor:id=SOCref.Configuration.IdentityManager.ComponentPluginConfiguration} @@ -313,23 +311,23 @@ h2. Component plug-in configuration {anchor:id=SOCref.Configuration.IdentityMana In which: || Name || Set-method || Type || Description || -| *SpaceIdentityProvider plugin* | registerIdentityProviders | org.exoplatform.social.core.identity.IdentityProviderPlugin | The plugin that provides identity for a space | +| *SpaceIdentityProvider plugin* | 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. | +| *providers* | {{Every other identity providers}} | {{org.exoplatform.social.core.identity.provider.SpaceIdentityProvider}} |The Identity Provider instances for managing identities. | h1. OpenSocial Rest Context Configuration {anchor:id=SOCref.Configuration.OpenSocialRestContextConfiguration} h2. Description {anchor:id=SOCref.Configuration.OpenSocialRestContextConfiguration.Description} -The service is used to configure the portal container name when there is a OpenSocial REST API request. By configuring this service, we can make sure to to reach the right portal container. +The service is used to configure the portal container name when there is a OpenSocial REST API request. By configuring this service, you must reach the right portal container. The default portal container is {{portal}}. h2. Component plug-in configuration {anchor:id=SOCref.Configuration.OpenSocialRestContextConfiguration.ComponentPluginConfiguration} -This should be used when there is a portal container different than the default {{portal}} one. +This should be used when there is a portal container different with the default {{portal}} one. {code:xml} @@ -351,9 +349,9 @@ This should be used when there is a portal container different than the default In which: || Name || Set-method || Type || Description || -| *set portal container name used for REST service* | setRestContainerName | org.exoplatform.social.opensocial.auth.RestPortalContainerNameConfig | The plugin provided to set rest portal container name for OpenSocial REST API request | +| *set portal container name used for REST service* | setRestContainerName | org.exoplatform.social.opensocial. auth.RestPortalContainerNameConfig | The plugin provided to set the rest portal container name for OpenSocial REST API request.| * Init-params: || Name || Possible value || Default Value || Description || -| *rest-container-name* | {{any valid portal container name}} | {{N/A}} | Portal container name | +| *rest-container-name* | {{any valid portal container name}} | {{N/A}} | The portal container name. | diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuring_the_oauth_2_legged_scenario.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuring_the_oauth_2_legged_scenario.wiki index be639e6cd2..26581af1e3 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuring_the_oauth_2_legged_scenario.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Configuring_the_oauth_2_legged_scenario.wiki @@ -1,6 +1,6 @@ -This is to explain how to configure the oAuth 2 legs scenario in openSocial. +This section is about configuring the oAuth 2 legs scenario in OpenSocial. (Reference: [OpenSocial.org|http://docs.opensocial.org/display/OS/Home]) -For more information about this, visit the website: [great article|http://sites.google.com/site/oauthgoog/2leggedoauth/2opensocialrestapi] +For more information, visit [2-legged OAuth for the OpenSocial REST API.|http://sites.google.com/site/oauthgoog/2leggedoauth/2opensocialrestapi] h1. Generate the certificates {anchor:id=SOCref.Configuration.Generate_certificates} To generate the key: @@ -13,7 +13,7 @@ $ openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM h1. Configure the property file {anchor:id=SOCref.Configuration.Configure_the_property_life} -Edit container.js and change the following parameter to point to your private key and your key name. +Edit _container.js_ and change the following parameter to point to your private key and your key name. {code} "gadgets.signingKeyFile" : "oauth.pem", diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Spaces_Template_Configuration.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Spaces_Template_Configuration.wiki index beeb327be2..1c6dfe129b 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Spaces_Template_Configuration.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/Configuration/Spaces_Template_Configuration.wiki @@ -1,8 +1,9 @@ -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). +In the Social function, you may have two space types (classic and webos spaces). This is for the classic mode (it is 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. +For the classic space, you can pre-configure the template. You can configure the layout to select where to display the applications (for example, the application's menu on the left, the selected application is displayed on the right, and more). + +Here is an example of the configuration file that displays the menu on the left. The application will be inserted in the container with the ID *Application*: -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*: {code:xml} @@ -25,11 +26,11 @@ Here is an example of configuration file that displays the menu on the left. The {code} -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. +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. -!spaces.png! +!images/spaces.png! -If you want to put your menu in right and your application in left, you can swap the declared position of two containers: +If you want to put the menu on the right and the application on the left, you can swap the declared position of these two containers: {code:xml} @@ -53,9 +54,10 @@ If you want to put your menu in right and your application in left, you can swap {code} -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 _$EXO_TOMCAT/webapps/social-ext/WEB-INF/conf/portal/template/pages/space/page.xml_. +In eXo Social standalone, this configuration file is at: +* _{{{$EXO_TOMCAT/webapps/socialdemo/WEB-INF/conf/portal/template/pages/space/page.xml}}}_ +In eXo Platform, this configuration file is at: +* _{{{$EXO_TOMCAT/webapps/{portal-name}/WEB-INF/conf/portal/template/pages/space/page.xml}}}_ diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation.wiki index 447fb25c44..d38e802fb8 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation.wiki @@ -1,52 +1,38 @@ - -eXo Social provides many extension point to make it fit to your needs. Every part can be customized and/or automated. +The Social function provides many extension point to make it fit to your needs. Every part can be customized and/or automated. h2. [Spaces|Developer Documentation Spaces ] -eXo Social provides a way to create groups and to share data and applications: the space. A space has it's own activity stream in which applications or members can publish information. In each space, members share applications and an openSocial dashboard. -With the API, you can create spaces, invite users, add applications be notified of events... +The Social function provides a way to create groups and to share data and applications: the space. A space has it's own activity stream in which applications or members can publish information. In each space, members share applications and an openSocial dashboard. +With the API, you can create spaces, invite users, add applications be notified of events, etc. -[Read more::|Developer Documentation Spaces] h2. [People|Developer Documentation People] -eXo Social provides a way to add profile information, relationships and connections between users: People. With the API, profile information, relationship can be customized. +The Social function provides a way to add profile information, relationships and connections between users: People. With the API, profile information, relationship can be customized. -[Read more::|Developer Documentation People] h2. [Activity Stream|Developer Documentation Activity Stream] -eXo Social provides a way to share status updates and activity informations for users as well as spaces: Activity Streams. With the API, you can customize the activities or publish new ones. - -[Read more::|Developer Documentation Activity Stream] +The Social function provides a way to share status updates and activity information for users as well as spaces: Activity Streams. With the API, you can customize the activities or publish new ones. h2. [OpenSocial|Developer Documentation OpenSocial] -eXo Social is implementing the OpenSocial standard. So you can integrate OpenSocial Gadget in your dashboard and use the RPC or REST API to access the social data. +The Social function is implementing the OpenSocial standard. So you can integrate OpenSocial Gadget in your dashboard and use the RPC or REST API to access the social data. -[Read more::|Developer Documentation OpenSocial] -eXo Social provides many extension point to make it fit to your needs. Every part can be customized and/or automated. +The Social function provides many extension point to make it fit to your needs. Every part can be customized and/or automated. h2. [Spaces|Developer Documentation Spaces ] -eXo Social provides a way to create groups and to share data and applications: the space. A space has it's own activity stream in which applications or members can publish information. In each space, members share applications and an openSocial dashboard. +The Social function provides a way to create groups and to share data and applications: the space. A space has it's own activity stream in which applications or members can publish information. In each space, members share applications and an openSocial dashboard. With the API, you can create spaces, invite users, add applications be notified of events... -[Read more::|Developer Documentation Spaces] - h2. [People|Developer Documentation People] -eXo Social provides a way to add profile information, relationships and connections between users: People. With the API, profile information, relationship can be customized. - -[Read more::|Developer Documentation People] +The Social function provides a way to add profile information, relationships and connections between users: People. With the API, profile information, relationship can be customized. h2. [Activity Stream|Developer Documentation Activity Stream] -eXo Social provides a way to share status updates and activity informations for users as well as spaces: Activity Streams. With the API, you can customize the activities or publish new ones. - -[Read more::|Developer Documentation Activity Stream] +The Social function provides a way to share status updates and activity information for users as well as spaces: Activity Streams. With the API, you can customize the activities or publish new ones. h2. [OpenSocial|Developer Documentation OpenSocial] -eXo Social is implementing the OpenSocial standard. So you can integrate OpenSocial Gadget in your dashboard and use the RPC or REST API to access the social data. - -[Read more::|Developer Documentation OpenSocial] \ No newline at end of file +The Social function is implementing the OpenSocial standard. So you can integrate OpenSocial Gadget in your dashboard and use the RPC or REST API to access the social data. diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Plugin.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Plugin.wiki index e8e432456c..bc5a8aafdf 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Plugin.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Plugin.wiki @@ -4,20 +4,20 @@ Since the Social 1.1.0, the activity plug-in feature was introduced that enables h1. Create the activity plug-in {anchor:id=Developer_document.Create the activity plug-in} -At first, you should have an idea about the UI Extension Framework. If you have already worked with the UI Extension Framework, it's really easy to create the activity plug-in. If no, you have chance to work with it visiting [UI Extension Framework|http://wiki.exoplatform.org/xwiki/bin/view/ECM/UI+Extension+Framework]. +At first, you should have an idea about the UI Extension Framework. If you have already worked with the UI Extension Framework, it is really easy to create the activity plug-in. If no, you have chance to work with it by reading [UI Extension Framework|http://wiki.exoplatform.org/xwiki/bin/view/ECM/UI+Extension+Framework]. h2. Create a custom UI component for displaying the activity based on its type {anchor:id=Developer_document.Create_custom_UI_component} {note} -("Project Code can be downloadable [here|http://wiki.exoplatform.org/xwiki/bin/download/Social/Developer%20Documentation%20Activity%20Plugin/exo.social.samples.activity-plugin.zip]") +Project Code can be downloaded [here|http://wiki.exoplatform.org/xwiki/bin/download/Social/Developer%20Documentation%20Activity%20Plugin/exo.social.samples.activity-plugin.zip] {note} When an activity is displayed, UIActivityFactory will look for its registered custom activity display by activity's type. If not found, UIDefaultActivity will be called for displaying that activity. -For example, in Social, there is an activity of type "exosocial:spaces" created by SpaceActivityPublisher. If you want to display it with our own UI component instead of default ones. +For example, in Social, there is an activity of type "exosocial:spaces" created by SpaceActivityPublisher. If you want to display it with your own UI component instead of the default ones. You can do as follows: -First, create a sample project: +*1.* Create a sample project. {code} mvn archetype:generate @@ -28,7 +28,7 @@ Choose version: 1 Define value for property 'groupId': : org.exoplatform.social.samples Define value for property 'artifactId': : exo.social.samples.activity-plugin Define value for property 'version': 1.0-SNAPSHOT: 1.0.0-SNAPSHOT -Define value for property 'package': org.exoplatform.social.samples: org.exoplatform.social.samples.activityPlugin +Define value for property 'package': org.exoplatform.social.samples: org.exoplatform.social.samples. activityPlugin Confirm properties configuration: groupId: org.exoplatform.social.samples artifactId: exo.social.samples.activity-plugin @@ -38,7 +38,7 @@ Y: y {code} -Edit the pom.xml file as follows. +*2.* Edit the pom.xml file as follows. {code:xml} {code} -To use the custom UI component for displaying its activity, we need a subclass of {{BaseUIActivity}}. We call this {{UISpaceSimpleActivity}}: +To use the custom UI component for displaying its activity, you need a subclass of {{BaseUIActivity}}. Let's call this {{UISpaceSimpleActivity}}: {code:java} package org.exoplatform.social.samples.activityplugin; @@ -158,7 +158,7 @@ public class SimpleSpaceUIActivityBuilder extends BaseUIActivityBuilder { } {code} -Next, create {{configuration.xml}} under conf/portal: +*3.* Create the _configuration.xml_ file under _conf/portal_: {code:xml} exosocial:spaces{code} , its value must match the activity's type you want to display with your UI component. -Build sample project and copy the jar to tomcat/lib. Run Social, create a space and access it. You can see: - +*4.* Build the sample project and copy the .jar to {{tomcat/lib}}. Then, run Social, create a space and access it. You can see space's activity of type "exosocial:spaces" is displayed by default in Social: -!SimpleSpaceActivity-default.png! - +!images/SimpleSpaceActivity-default.png! -With our custom UI component for displaying activity of type: "exosocial:spaces": -!SimpleSpaceActivity-custom.png! +With your custom UI component for displaying activity of type: "exosocial:spaces": +!images/SimpleSpaceActivity-custom.png! -Make the custom UI activity display have the look and feel and function like default one. +*5.* Make the custom UI activity display have the look, feel and function like the default one. -When displaying an activity, we should make sure the look and feel of the custom UI component is consistent and match other activities and have the functions of like, comments. So, to create the another UI component to display, we call {{UISpaceLookAndFeelActivity}}: +When displaying an activity, you should make sure the look and feel of the custom UI component is consistent and match other activities and have the functions of like, comments. So, to create the another UI component to display, call {{UISpaceLookAndFeelActivity}}: {code:java} package org.exoplatform.social.samples.activityplugin; @@ -222,8 +220,8 @@ import org.exoplatform.webui.core.lifecycle.UIFormLifecycle; @EventConfig(listeners = BaseUIActivity.LikeActivityActionListener.class), @EventConfig(listeners = BaseUIActivity.SetCommentListStatusActionListener.class), @EventConfig(listeners = BaseUIActivity.PostCommentActionListener.class), - @EventConfig(listeners = BaseUIActivity.DeleteActivityActionListener.class, confirm = "UIActivity.msg.Are_You_Sure_To_Delete_This_Activity"), - @EventConfig(listeners = BaseUIActivity.DeleteCommentActionListener.class, confirm = "UIActivity.msg.Are_You_Sure_To_Delete_This_Comment") + @EventConfig(listeners = BaseUIActivity.DeleteActivityActionListener.class, confirm = "UIActivity. msg.Are_You_Sure_To_Delete_This_Activity"), + @EventConfig(listeners = BaseUIActivity.DeleteCommentActionListener.class, confirm = "UIActivity. msg.Are_You_Sure_To_Delete_This_Comment") } ) public class UISpaceLookAndFeelActivity extends BaseUIActivity { @@ -231,9 +229,10 @@ public class UISpaceLookAndFeelActivity extends BaseUIActivity { } {code} -Now, create the {{UISpaceLookAndFeelActivity}} template by copying the content of [UIDefaultActivity.gtmpl|http://fisheye.exoplatform.org/browse/social/tags/1.1.0-GA/component/webui/src/main/resources/groovy/social/webui/activity/UIDefaultActivity.gtmpl?r=HEAD] to this template file. -You should make needed modifications for this template. We make a small modification here: +*6.* Create the {{UISpaceLookAndFeelActivity}} template by copying the content of [UIDefaultActivity.gtmpl|http://fisheye.exoplatform.org/browse/social/tags/1.1.0-GA/component/webui/src/main/resources/groovy/social/webui/activity/UIDefaultActivity.gtmpl?r=HEAD] to this template file. + +You should make needed modifications for this template. {code}
@@ -241,12 +240,12 @@ You should make needed modifications for this template. We make a small modifica
{code} -We need to reconfigure {{configuration.xml}}: +*7.* Reconfigure the {{configuration.xml}} file: {code:xml} org.exoplatform.webui.ext.UIExtensionManager @@ -260,8 +259,8 @@ We need to reconfigure {{configuration.xml}}: org.exoplatform.social.webui.activity.BaseUIActivity exosocial:spaces - org.exoplatform.social.samples.activityplugin.UISpaceLookAndFeelActivity - org.exoplatform.social.samples.activityplugin.SimpleSpaceUIActivityBuilder + org.exoplatform.social.samples.activityplugin. UISpaceLookAndFeelActivity + org.exoplatform.social.samples.activityplugin. SimpleSpaceUIActivityBuilder @@ -270,16 +269,358 @@ We need to reconfigure {{configuration.xml}}: {code} -Rebuild the sample project, copy jar to tomcat/lib. Rerun the server and see the result: +*8.* Rebuild the sample project, copy the *.jar* file to tomcat/lib. Run the server again and see the result: -!LookAndFeelSpaceActivity.png! +!images/LookAndFeelSpaceActivity.png! {note} -Currently, we have to copy and paste in the template file. We will have the full control of the UI, but it is not good when there is any change in UIDefaultActivity. +Currently, you have to copy and paste in the template file. By this way, you have full control of the UI but it is not a good way when there are changes in UIDefaultActivity. This will be improved soon so that no copy/paste is needed. {note} h3. What is activity builder? {anchor:id=Developer_document.What_is_activity_builder} -{note}to do{note} + +ActivityBuilder is one class which is used to get values of _ExoSocialActivity_ to set to UIActivity for displaying. The Social function provides the BaseUIActivityBuilder class for developers to extend and customize their own activity builder easily and properly. + +For example, to write your own UILinkActivityBuilder, you just need to extend BaseUIActivityBuilder and then customize attributes and behaviors of the activity builder as below. + +{code:java} +public class UILinkActivityBuilder extends BaseUIActivityBuilder { + private static final Log LOG = ExoLogger.getLogger(UILinkActivityBuilder.class); + @Override + protected void extendUIActivity(BaseUIActivity uiActivity, ExoSocialActivity activity) { + UILinkActivity uiLinkActivity = (UILinkActivity) uiActivity; + Map templateParams = activity.getTemplateParams(); + uiLinkActivity.setLinkSource(templateParams.get(UILinkActivityComposer.LINK_PARAM)); + uiLinkActivity.setLinkTitle(templateParams.get(UILinkActivityComposer.TITLE_PARAM)); + uiLinkActivity.setLinkImage(templateParams.get(UILinkActivityComposer.IMAGE_PARAM)); + uiLinkActivity.setLinkDescription(templateParams.get(UILinkActivityComposer.DESCRIPTION_PARAM)); + uiLinkActivity.setLinkComment(templateParams.get(UILinkActivityComposer.COMMENT_PARAM)); + } +} +{code} + +{note} +To learn more about ActivityBuilder, refer to the [BaseUIActivity class.|http://svn.exoplatform.org/projects/social/trunk/component/webui/src/main/java/org/exoplatform/social/webui/activity/BaseUIActivity.java] +{note} + h2. Create a composer extension for composing activity on the UI composer and display it on activity stream {anchor:id=Developer_document.Create_composer_extension} -{note}to do{note} +The UIActivityComposer is an extended class of UIContainer that is used to display inputs for users to create their own activities. To write your own activity composer, it is recommended that you use the UIActivityComposer available in the Social function. + +For example, to create an input component for inserting video links into your activity, do the following steps: + +*1.* Write UIVideoActivityComposer which extends UIActivityComposer. The UIActivityComposer allows you to input extended activities (for example, adding videos, links or documents) on the UI composer. + +{code:java} +package org.exoplatform.social.plugin.videolink; + +import org.exoplatform.social.plugin.videolink.util.VideoEmbedTool; +@ComponentConfig( + template = "classpath:groovy/social/plugin/videolink/UIVideoActivityComposer.gtmpl", + events = { + @EventConfig(listeners = UIVideoActivityComposer.SearchVideo.class), + @EventConfig(listeners = UIVideoActivityComposer.SelectVideoFromResultList.class), + @EventConfig(listeners = UIVideoActivityComposer.AttachActionListener.class), + @EventConfig(listeners = UIVideoActivityComposer.ChangeLinkContentActionListener.class), + @EventConfig(listeners = UIActivityComposer.CloseActionListener.class), + @EventConfig(listeners = UIActivityComposer.SubmitContentActionListener.class), + @EventConfig(listeners = UIActivityComposer.ActivateActionListener.class) + } +) + +public class UIVideoActivityComposer extends UIActivityComposer { + + public static final String LINK_PARAM = "link"; + public static final String IMAGE_PARAM = "image"; + public static final String TITLE_PARAM = "title"; + public static final String HTML_PARAM = "htmlembed"; + public static final String COMMENT_PARAM = "comment"; + + private static final String HTTP = "http://"; + private static final String HTTPS = "https://"; + private JSONObject videoJson; + private boolean linkInfoDisplayed_ = false; + private Map templateParams; + + /** + * The constructor. + */ + public UIVideoActivityComposer() { + setReadyForPostingActivity(false); + addChild(new UIFormStringInput("InputLink", "InputLink", null)); + } + /** + * Set the link info to be displayed. + * + * @param displayed + */ + public void setLinkInfoDisplayed(boolean displayed) { + linkInfoDisplayed_ = displayed; + } + + /** + * Set the template params. + * + * @param templateParams + */ + public void setTemplateParams(Map templateParams) { + this.templateParams = templateParams; + } + + /** + * Get the template params. + */ + public Map getTemplateParams() { + return templateParams; + } + + /** + * Clear the video json. + */ + public void clearVideoJson() { + videoJson = null; + } + + /** + * Get the video json. + */ + public JSONObject getVideoJson() { + return videoJson; + } + + /** + * Set the link. + + * @param url + * @throws Exception + */ + private void setLink(String url) throws Exception { + if (!(url.contains(HTTP) || url.contains(HTTPS))) { + url = HTTP + url; + } + + videoJson = VideoEmbedTool.getoembedData(url); + templateParams = new HashMap(); + templateParams.put(LINK_PARAM, url); + templateParams.put(TITLE_PARAM, videoJson.getString(VideoEmbedTool.OEMBED_TITLE)); + templateParams.put(HTML_PARAM, videoJson.getString(VideoEmbedTool.OEMBED_HTML)); + setLinkInfoDisplayed(true); + } + + static public class AttachActionListener extends EventListener { + + @Override + public void execute(Event event) throws Exception { + WebuiRequestContext requestContext = event.getRequestContext(); + UIVideoActivityComposer uiComposerLinkExtension = event.getSource(); + String url = requestContext.getRequestParameter(OBJECTID); + try { + uiComposerLinkExtension.setLink(url.trim()); + } catch (Exception e) { + uiComposerLinkExtension.setReadyForPostingActivity(false); + return; + } + requestContext.addUIComponentToUpdateByAjax(uiComposerLinkExtension); + event.getSource().setReadyForPostingActivity(true); + } + } + + static public class ChangeLinkContentActionListener extends EventListener { + @Override + public void execute(Event event) throws Exception { + WebuiRequestContext requestContext = event.getRequestContext(); + UIVideoActivityComposer uiComposerLinkExtension = event.getSource(); + + Map tempParams = new HashMap(); + + uiComposerLinkExtension.setTemplateParams(tempParams); + requestContext.addUIComponentToUpdateByAjax(uiComposerLinkExtension); + UIComponent uiParent = uiComposerLinkExtension.getParent(); + if (uiParent != null) { + uiParent.broadcast(event, event.getExecutionPhase()); + } + } + } + + public static class SelectVideoFromResultList extends EventListener{ + @Override + public void execute(Event event) throws Exception { + WebuiRequestContext requestContext = event.getRequestContext(); + UIVideoActivityComposer uiComposerLinkExtension = event.getSource(); + + } + } + + public static class SearchVideo extends EventListener{ + + @Override + public void execute(Event event) throws Exception { + WebuiRequestContext requestContext = event.getRequestContext(); + UIVideoActivityComposer uiComposerLinkExtension = event.getSource(); + + + } + } + + @Override + public void onPostActivity(PostContext postContext, UIComponent source, + WebuiRequestContext requestContext, String postedMessage) throws Exception { + + templateParams.put(COMMENT_PARAM, postedMessage); + setTemplateParams(templateParams); + if (templateParams.size() == 0) { + uiApplication.addMessage(new ApplicationMessage("UIComposer.msg.error.Empty_Message", + null, + ApplicationMessage.WARNING)); + return; + } + String title = "Shared a video: ${" + TITLE_PARAM + "} "; + ExoSocialActivity activity = new ExoSocialActivityImpl(userIdentity.getId(), + UIVideoActivity.ACTIVITY_TYPE, + title, + null); + activity.setTemplateParams(templateParams); + + if (postContext == UIComposer.PostContext.SPACE) { + + UIActivitiesContainer activitiesContainer = uiDisplaySpaceActivities.getActivitiesLoader(). getActivitiesContainer(); + activitiesContainer.addActivity(activity); + requestContext.addUIComponentToUpdateByAjax(activitiesContainer); + requestContext.addUIComponentToUpdateByAjax(uiComposer); + } else if (postContext == PostContext.USER) { + UIUserActivitiesDisplay uiUserActivitiesDisplay = (UIUserActivitiesDisplay) getActivityDisplay(); + String ownerName = uiUserActivitiesDisplay.getOwnerName(); + Identity ownerIdentity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, + ownerName, false); + + activityManager.saveActivity(ownerIdentity, activity); + + if (uiUserActivitiesDisplay.getSelectedDisplayMode() == UIUserActivitiesDisplay.DisplayMode. MY_STATUS) { + UIActivitiesContainer activitiesContainer = uiUserActivitiesDisplay.getActivitiesLoader(). getActivitiesContainer(); + if (activitiesContainer.getChildren().size() == 1) { + uiUserActivitiesDisplay.setSelectedDisplayMode(UIUserActivitiesDisplay.DisplayMode.MY_STATUS); + } else { + activitiesContainer.addActivity(activity); + requestContext.addUIComponentToUpdateByAjax(activitiesContainer); + requestContext.addUIComponentToUpdateByAjax(uiComposer); + } + } else{ + uiUserActivitiesDisplay.setSelectedDisplayMode(UIUserActivitiesDisplay.DisplayMode.MY_STATUS); + } + } + } +} +{code} + +*2.* Use the BaseUIActivity class to write and customize the UIActivity display as below: + +{code:java} +package org.exoplatform.social.plugin.videolink; +import org.exoplatform.social.webui.activity.BaseUIActivity; +import org.exoplatform.webui.config.annotation.ComponentConfig; +import org.exoplatform.webui.core.lifecycle.UIFormLifecycle; +import org.exoplatform.webui.config.annotation.EventConfig; +@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "classpath:groovy/social/plugin/ videolink/UIVideoActivity.gtmpl", events = { + @EventConfig(listeners = BaseUIActivity.ToggleDisplayLikesActionListener.class), + @EventConfig(listeners = BaseUIActivity.ToggleDisplayCommentFormActionListener.class), + @EventConfig(listeners = BaseUIActivity.LikeActivityActionListener.class), + @EventConfig(listeners = BaseUIActivity.SetCommentListStatusActionListener.class), + @EventConfig(listeners = BaseUIActivity.PostCommentActionListener.class), + @EventConfig(listeners = BaseUIActivity.DeleteActivityActionListener.class, confirm = "UIActivity. msg.Are_You_Sure_To_Delete_This_Activity"), + @EventConfig(listeners = BaseUIActivity.DeleteCommentActionListener.class, confirm = "UIActivity. msg.Are_You_Sure_To_Delete_This_Comment") + } +) +public class UIVideoActivity extends BaseUIActivity { + public static final String ACTIVITY_TYPE = "VIDEO_ACTIVITY"; + private String linkSource = ""; + private String linkTitle = ""; + private String linkHTML = ""; + private String linkComment = ""; + + /** + * Get the link comment. + */ + public String getLinkComment() { + return linkComment; + } + + /** + * Set the link comment. + * + * @param linkComment + */ + public void setLinkComment(String linkComment) { + this.linkComment = linkComment; + } + + /** + * Get the link html. + */ + public String getLinkHTML() { + return linkHTML; + } + + /** + * Set the link html. + * + * @param linkHTML + */ + public void setLinkHTML(String linkHTML) { + this.linkHTML = linkHTML; + } + + /** + * Get the link source. + */ + public String getLinkSource() { + return linkSource; + } + + /** + * Set the link source. + * + * @param linkSource + */ + public void setLinkSource(String linkSource) { + this.linkSource = linkSource; + } + + /** + * Get the link title. + */ + public String getLinkTitle() { + return linkTitle; + } + + /** + * Set the link title. + * + * @param linkTitle + */ + public void setLinkTitle(String linkTitle) { + this.linkTitle = linkTitle; + } +} +{code} + +*3.* Use the _UIVideoActivityBuilder_ class to get values of _ExoSocialActivity_ that are set to UIVideoActivity for displaying. + +{code:java} +package org.exoplatform.social.plugin.videolink; +import java.util.Map; +import org.exoplatform.social.core.activity.model.ExoSocialActivity; + +public class UIVideoActivityBuilder extends BaseUIActivityBuilder { + private static final Log LOG = ExoLogger.getLogger(UIVideoActivityBuilder.class); + @Override + protected void extendUIActivity(BaseUIActivity uiActivity, ExoSocialActivity activity) { + UIVideoActivity uiVideoActivity = (UIVideoActivity) uiActivity; + Map templateParams = activity.getTemplateParams(); + uiVideoActivity.setLinkSource(templateParams.get(UIVideoActivityComposer.LINK_PARAM)); + uiVideoActivity.setLinkTitle(templateParams.get(UIVideoActivityComposer.TITLE_PARAM)); + uiVideoActivity.setLinkImage(templateParams.get(UIVideoActivityComposer.IMAGE_PARAM)); + uiVideoActivity.setLinkHTML(templateParams.get(UIVideoActivityComposer.HTML_PARAM)); + uiVideoActivity.setLinkComment(templateParams.get(UIVideoActivityComposer.COMMENT_PARAM)); + } +} +{code} diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Stream.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Stream.wiki index a3fd57be5d..03afc2569f 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Stream.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Activity_Stream.wiki @@ -1,13 +1,12 @@ -eXo Social provides a way to share status updates and activity information for users as well as spaces (aka Activity Streams). With the API, you can customize the activities or publish new ones. - -To manipulate activities, you will use the [ActivityManager|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html]. To get an instance of this class, you will need to use the {{PortalContainer}}. +The Social function provides users a way to share their activity information (also known as Activity Stream) and collaborate in spaces (also known as group work). With the API, you can customize the way to display activities or publish new ones. +To manipulate activities, you need to use the _AtivityManager_ service. h1. Create an activity {anchor:id=SOCref.Developer_references.CreateActivity} -There are two types of activities : activities for a user and activities for a space. The following examples will show you how to create an activity for each type. +There are two types of activities: activities for a user and activities for a space. The following examples will show you how to create an activity for each type. h1. Publish an activity for a user {anchor:id=SOCref.Developer_references.Publish_an_activity_for_a_user} -Users have activity streams. The code below shows you how to publish a nex activity into the public activity stream of a user. +Users have activity streams. The code below shows you how to publish a next activity into the public activity stream of a user. {code:java} import org.exoplatform.container.PortalContainer; @@ -47,7 +46,7 @@ import org.exoplatform.social.core.identity.model.Identity; {code} h1. Publish an activity for a space {anchor:id=SOCref.Developer_references.Publish_an_activity_for_a_space} -Spaces are also social objects and thus, they own an activity stream. The code below shows you how to publish activity into a space's stream +Spaces are also social objects and thus, they own activity stream. The code below shows you how to publish activity into a space's stream {code:java} import org.exoplatform.container.PortalContainer; @@ -103,19 +102,19 @@ import org.exoplatform.social.space.impl.SpaceIdentityProvider; h1. Useful functions {anchor:id=SOCref.Developer_references.Useful_functions} -* [ActivityManager#getActivity|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#getActivities|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#saveActivity|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#saveComment|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#saveLike|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#removeLike|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] -* [ActivityManager#getComments|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-activitystream-ActivityManager.html] +* ActivityManager#getActivity +* ActivityManager#getActivities +* ActivityManager#saveActivity +* ActivityManager#saveComment +* ActivityManager#saveLike +* ActivityManager#removeLike +* ActivityManager#getComments h2. Configure an activity processor {anchor:id=SOCref.Developer_references.ConfigureAnActivityProcessor} -An Activity processor is used for modifying the content of activities before they are responsed and rendered at client's browser. For example, we will create an activity processor for replacing all the texts representing the smile face ":-)" in the activity title by the smiley icons. +An Activity processor is used for modifying the content of activities before they are responsed and rendered at client's browser. For example, you will create an activity processor for replacing all the texts representing the smile face ":-)" in the activity title by the smiley icons. -Firstly, we will create the {{SmileyProcessor}} class by extending the {{BaseActivityProcessorPlugin}} +Firstly, you will create the {{SmileyProcessor}} class by extending the {{BaseActivityProcessorPlugin}} {code:java} package org.exoplatform.social.core.activitystream; @@ -135,7 +134,7 @@ public class SmileyProcessor extends BaseActivityProcessorPlugin { } {code} -And then, we have to register this processor by adding some XML configuration into the project configuration file (configuration.xml) +Then, register this processor by adding some XML configuration into the project configuration file (configuration.xml). {code:xml} @@ -157,11 +156,11 @@ And then, we have to register this processor by adding some XML configuration in {code} -"init-params" contains all the key-value data which a processor will use to initialize. At the above config, priority value indicates the order that this processor will be used. So with '1' value, this processor will be used before all remaining processors with lower priority. +"init-params" contains all the key-value data which a processor will use to initialize. At the above configuration, priority value indicates the order that this processor will be used. So with '1' value, this processor will be used before all remaining processors with lower priority. -h1. Publish an rss feed with feedmash {anchor:id=SOCref.Developer_references.Publish_an_rss_feed_with_feedmash} +h1. Publish an RSS feed with feedmash {anchor:id=SOCref.Developer_references.Publish_an_rss_feed_with_feedmash} -It's really easy to publish an rss feed to a space's activity stream. eXo Social already provides {{FeedmashJobPlugin}} for publishing rss feeds. As you can see in project {{exo.social.extras.feedmash}}, there are {{JiraFeedConsumer}} and {{HudsonFeedConsumer}} samples to post eXo Social project's feeds (jira and hudson) to a pre-defined space: {{exosocial}} in a specifiportal container: {{socialdemo}} as in the configuration file: +It is really easy to publish an RSS feed to a space's activity stream. The Social function already provides {{FeedmashJobPlugin}} for publishing RSS feeds. As you can see in project {{exo.social.extras.feedmash}}, there are {{JiraFeedConsumer}} and {{HudsonFeedConsumer}} samples to post eXo Social project's feeds (Jira and Hudson) to a pre-defined space: {{exosocial}} in a specifiportal container: {{socialdemo}} as in the configuration file: {code:xml} @@ -220,4 +219,4 @@ It's really easy to publish an rss feed to a space's activity stream. eXo Social {code} -When running eXo Social, login with http://localhost:8080/socialdemo and create a space named "exosocial". Done, all the feeds from jira and hudson for Social project will be automatically published to {{exosocial}} space. +When running eXo Social, login with http://localhost:8080/socialdemo and create a space named "exosocial". All feeds from Jira and Hudson for eXo Social project will be automatically published to {{exosocial}} space. diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_OpenSocial.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_OpenSocial.wiki index d3e9423ea9..ec10377215 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_OpenSocial.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_OpenSocial.wiki @@ -1,27 +1,28 @@ - -eXo Social is implementing the OpenSocial standard. So you can integrate OpenSocial Gadget in your dashboard and use the RPC or REST API to access to the social data. -With the support for the OpenSocial standard, eXo Social provides a framework for developers to build gadgets that can display and mash-up activity information for contacts, social networks, applications and services. +The Social function supports the OpenSocial standard. So you can integrate OpenSocial gadgets in your dashboard and use the RPC or REST service to view or publish the social data. +With the support for the OpenSocial standard, the Social provides a framework for developers to build gadgets that can display and mash up activity information for contacts, social networks, applications and services. h1. Gadget {anchor:id=SOCref.Developers_References.OpenSocial.Gadget} -Gadgets are web-based software components based on HTML, CSS, and JavaScript. They allow developers to easily write useful web applications that work anywhere on the web without modification. To know more, we suggest some links for detail information : +Gadgets are web-based software components based on HTML, CSS, JavaScript; defined by using an XML declaration syntax. They allow developers to easily write social applications that work on the social networks supporting OpenSocial APIs without modification. See the following links for detailed information: -[Gadgets Specification | http//code:google.com-apis-gadgets-docs-spec.html] +* [Gadgets Specification v1.1|http://opensocial-resources.googlecode.com/svn/spec/1.1/Social-Gadget.xml] -[OpenSocial Core Gadget Specification 10 | http:--opensocial-resources.googlecode.com-svn-spec-1.0-Core-Gadget.xml] +* [OpenSocial Core Gadget Specification v1.1|http://opensocial-resources.googlecode.com/svn/spec/1.1/Core-Gadget.xml] -After getting acquainted with Gadget concept, we enter into the detail on how to create an opensocial gadget. However, the tutorials are done greatly in Opensocial official site so we refer you to read these tutorials at [that website|http://wiki.opensocial.org/index.php?title=Gadget_Developer's_Guide] +You are going to the detail on how to create an opensocial gadget. However, the tutorials are done greatly in Opensocial official site so you should read these tutorials at [this website|http://wiki.opensocial.org/index.php?title=Gadget_Developer's_Guide] -We only note that in Opensocial gadgets only work in the dashboard in eXo Social. +{note} +In Opensocial, gadgets only work in the dashboard in the Social. +{note} h2. Supported APIs {anchor:id=SOCref.Developers_References.OpenSocial.Supported_APIs} -As we have said above, eXo Social is implementing the OpenSocial standard. So every eXo Social implementations apply the Opensocial Specification generally or [Apache Shindig|http://shindig.apache.org/overview.html] specifically. Therefore, eXo Social uses and extends Apache Shindig APIs to compatible with the common Opensocial APIs which is supported by other big social networks like [Ning|http://www.ning.com], [Hi5|http://www.hi5.com], [Orkut|http://www.orkut.com] ... +As said above, the Social is implementing the OpenSocial standard. So, every Social implementations apply the Opensocial Specification generally or [Apache Shindig|http://shindig.apache.org/overview.html] specifically. Therefore, Social uses and extends Apache Shindig APIs to compatible with the common Opensocial APIs which is supported by other big social networks like [Ning|http://www.ning.com], [Hi5|http://www.hi5.com], [Orkut|http://www.orkut.com], etc. -To get more detail about Supported APIs, we refer you to read [Opensocial Specs|http://www.opensocial.org/page/specs-1] +To get more details about Supported APIs, you should also read [Opensocial Specs|http://www.opensocial.org/page/specs-1]. h1. REST/RPC API {anchor:id=SOCref.Developers_References.OpenSocial.REST_RPC_API} -If your eXo social server is running on http://localhost:8080/ the address of the API will be: +If your Social server is running on http://localhost:8080/m the address of the API will be: REST API: http://localhost:8080/social/social/rest @@ -31,11 +32,10 @@ http://localhost:8080/social/social/rpc To learn what you can do with this APIs, have a look at the [specification|http://opensocial-resources.googlecode.com/svn/spec/1.0/Social-Data.xml]. If you are developing in Java, you can use the [opensocial-java-client|http://code.google.com/p/opensocial-java-client/] - h2. Configure the security {anchor:id=SOCref.Developers_References.OpenSocial.Configure_security} If you are using opensocial, there is good chance you are going to need to configure the oAuth authentication. To do this, you need to edit the configuration to add you oAuth key. -Edit the file: gatein/conf/portal/portal/configuration.xml and add this component: +Edit the file: _gatein/conf/portal/portal/configuration.xml_ and add this component: {code} org.exoplatform.social.opensocial.oauth.ServiceProviderStore @@ -44,7 +44,9 @@ Edit the file: gatein/conf/portal/portal/configuration.xml and add this componen grails-book-flow - consmer key and secret for sample oauth provider. + + consmer key and secret for sample oauth provider. + @@ -53,12 +55,12 @@ Edit the file: gatein/conf/portal/portal/configuration.xml and add this componen {code} -The consumerKey and sharedSecret are the key that need to be shared with the application that is doing the request. +The consumerKey and sharedSecret are the key that need to be shared with the application that is doing the request. h2. Publish an activity into a space {anchor:id=SOCref.Developers_References.OpenSocial.Publish_Activity_Into_Space} -eXo Social added this functionality that is not available in the standard opensocial API. You can publish activities into a space using the opensocial API. +The Social function added this functionality that is not available in the standard opensocial API. You can publish activities into a space using the opensocial API. To do this, instead of publishing your activity to the group @self as usual, publish it to the group "space:spaceID" or "space:spaceName". @@ -66,7 +68,7 @@ Using the opensocial java library and groovy, your code will look like this: {code} def client = getOpenSocialClient() - //we create our new activity + //we create your new activity Activity activity = new Activity() activity.title = "BookFlow Purchase" activity.body = "xx puchased the book xxx" @@ -78,7 +80,7 @@ Using the opensocial java library and groovy, your code will look like this: client.send(request); {code} -As you can see in this example, we set the groupId to "space:bookflow", bookflow being the name of our space. +As you can see in this example, the groupId is set to "space:bookflow", BookFlow is the name of your space. h3. Tutorial {anchor:id=SOCref.Developers_References.OpenSocial.Tutorial} -* See [Grails + eXo Social tutorial|http://www.exoplatform.com/company/public/website/resource-viewer?path=/website/Content%20types/Tutorial/grails-exo-social]. \ No newline at end of file +* See [Grails + Social tutorial|http://www.exoplatform.com/company/public/website/resource-viewer?path=/website/Content%20types/Tutorial/grails-exo-social]. \ No newline at end of file diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_People.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_People.wiki index a6bd53ed0e..d2972e3b66 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_People.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_People.wiki @@ -1,4 +1,4 @@ -eXo Social provides a way to add profile informations, relationships and connections between users: People. With the eXo People API, profile informations and relationship can be easily managed and customized. +Social provides a way to add profile informations, relationships and connections between users: People. With the eXo People API, profile informations and relationship can be easily managed and customized. h1. Identity {anchor:id=SOCref.Developers_References.People.Identity} The identity allows to identity uniquely a social object. Social objects can be persons, groups, applications, or whatever you think deserves social interactions like connecting, publishing an activity stream or holding a profile. @@ -22,11 +22,11 @@ class SampleIdentityProvider extends OrganizationIdentityProvider{ } {code} -In this example, we created a SampleIdentityProvider class extending OrganizationIdentityProvider which is the IdentityProvider used to connect to the portal user's base. In this class, we overrided the populateProfile method and added some dummy data in the profile fields. +In this example, the _SampleIdentityProvider_ class extends _OrganizationIdentityProvider_ which is the IdentityProvider used to connect to the portal user's base. In this class, the _populateProfile_ method is overridden and some dummy data are added to the profile fields. h2. IdentityManager {anchor:id=SOCref.Developers_References.People.IdentityManager} -The IdentityManager is the service used to manipulate the identity operations like creating, getting, deleting or finding a profile. We can get the IdentityManager via the ExoContainer. The following code will show how to get an IdentityManager instance and create a basic identity instance : +IdentityManager is the service used to manipulate the identity operations, such as creating, getting, deleting or finding a profile. You can get the IdentityManager via the ExoContainer. The following code will show how to get an IdentityManager instance and create a basic identity instance: {code:language=java} import org.exoplatform.container.ExoContainer; @@ -56,9 +56,9 @@ Identity userIdentity = identityManager.getOrCreateIdentity(OrganizationIdentity h1. ProfileListener {anchor:id=SOCref.Developers_References.People.ProfileListener} -The People API provides some notification interfaces which programmers can implement in order to create their own handlers for notifications like notifications() for profile modifications([ProfileListenerPlugin|(ProfileListenerPlugin--]]) or for relationship changes([RelationshipListenerPlugin|(RelationshipListenerPlugin--]]). The following example will guide you through implementing one of these interfaces and show you how to configure this plugin. +The People API provides some notification interfaces which programmers can implement in order to create their own handlers for notifications like notifications() for profile modifications(ProfileListenerPlugin) or for relationship changes(RelationshipListenerPlugin). The following example will guide you through implementing one of these interfaces and show you how to configure this plugin. -We will create the class ProfileLoggerListener. Its tasks is to log all profile modifications of the systems. The abstract class ProfileListenerPlugin provides us the interface to implement this method. +We will create the class ProfileLoggerListener. Its task is to log all profile modifications of the systems. The abstract class ProfileListenerPlugin provides us the interface to implement this method. {code:language=java} import org.exoplatform.services.log.ExoLogger; @@ -96,7 +96,7 @@ public class ProfileLoggerListener extends ProfileListenerPlugin{ } {code} -After creating the ProfileLoggerListener class, we have to add some configurations for this class to the configuration.xml : +After creating the ProfileLoggerListener class, you have to add some configurations for this class to the _configuration.xml_: {code:language=xml} @@ -112,11 +112,11 @@ After creating the ProfileLoggerListener class, we have to add some configuratio h1. Relationships {anchor:id=SOCref.Developers_References.People.Relationships} Similarly, you can apply the above steps to implement the RelationshipListenerPlugin for relationship notifications. -Relationship is the bridge between two identities in eXo Social. There are many types of relationships defined in the Relationship class. With these types, a user can invite another user, confirm invitations or remove relationship. +Relationship is the bridge between two identities in Social. There are many types of relationships defined in the Relationship class. With these types, a user can invite another user, confirm invitations or remove relationship. h2. User connection {anchor:id=SOCref.Developers_References.People.Connecting_users} -The following code will show how to invite a user to connect to another : +The following code will show how to invite a user to connect: {code:language=java} import org.exoplatform.container.ExoContainer; @@ -147,7 +147,10 @@ public void inviteUser() throws Exception { h2. RelationshipListener {anchor:id=SOCref.Developers_References.People.RelationshipListener} -Let's take a look at relationship Listener([RelationshipListenerPlugin|http//repository:exoplatform.org-service-local-repositories-public-archive-org-exoplatform-social-social-1.0.0-GA-social-1.0.0-GA-javadoc.jar-!-org-exoplatform-social-core-relationship-lifecycle-RelationshipListenerPlugin.html]). The following example will show you how to implement one of these interfaces and how to configure this plugin. The following step is similar to the Profile notifications implementation. +The following example will show you how to implement one of these interfaces and how to configure this plugin. The following step is similar to the Profile notifications implementation. + +*1.* Create the _RelationshipLoggerListener_ class: + {code:language=java} import org.exoplatform.social.core.relationship.Relationship; @@ -189,7 +192,7 @@ public class RelationshipLoggerListener extends RelationshipListenerPlugin{ } {code} -After creating the RelationshipLoggerListener class, we have to add some configurations for this class to the configuration.xml : +*2.* Add some configurations for this class in the _configuration.xml_ file: {code:language=xml} org.exoplatform.social.core.relationship.RelationshipManager diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Spaces.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Spaces.wiki index 2fc28a44ec..91a8b433df 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Spaces.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developer_Documentation_Spaces.wiki @@ -1,8 +1,10 @@ -eXo Social provides a way to create groups and to share data and applications: the space. A space has it's own activity stream in which applications or members can publish information. In each space, members share applications and an openSocial dashboard. +The Social function provides a way to create groups and to share data and applications by spaces. A space has its own activity stream in which applications or members can publish information. In each space, members use applications together with shared data. + +To manipulate the spaces, you will use the SpaceService. To get an instance of this class, you need to get the current _PortalContainer_ instance. -To manipulate the spaces, you will use the SpaceService. To get an instance of this class, you will need to get current PortalContainer instance. h1. Spaces Management {anchor:id=SOCref.Developer_Ref.Developer_document_Spaces.Space_Management} h2. Create a space {anchor:id=SOCref.Developer_Ref.Developer_document_Spaces.Space_Management.Create_Space} + The following example shows how to create a space: {code:java} package org.exoplatform.social.sample; @@ -41,7 +43,7 @@ public class SpaceCreationSample { h1. Space's applications management {anchor:id=SOCref.Developer_Ref.Developer_document_Spaces.Space_applications_managemnet} h2. Add an application to a space {anchor:id=SOCref.Developer_Ref.Developer_document_Spaces.Add_application_to_a_space} -We can add a portlet or gadget applications into spaces. Once added, all members of the space can use that application. The following code shows how to add an application into a space : +You can add portlet or gadget applications to spaces. Once added, all members of the space can use that application. The following code shows you how to add an application to a space: {code: java} public void addApplicationToSpace() throws SpaceException { @@ -62,12 +64,13 @@ public void addApplicationToSpace() throws SpaceException { spaceService.activateApplication(spaceId, appId); } {code} + {note} -appId is the portlet or gadget name as defined in portlet.xml or gadget.xml in the web-app. With eXo Social, we can find it in social-portlet.war and social.war. +_appId_ is the portlet or gadget name as defined in _portlet.xml_ or _gadget.xml_ in the web-app. You can find it in _social-portlet.war_ and _social.war_. {note} h1. Members Management {anchor:id=SOCref.Developer_Ref.Developer_document_Space.Members_Management} -The SpaceService allows you to manage the spaces' members.Here is how you would add a now member to a space: +SpaceService allows you to manage the spaces' members. Here is the way to add a new member to a space: {code:java} String spaceName = "mySpace"; @@ -79,21 +82,22 @@ if (space != null) { spaceService.addMember(space, "mary"); } {code} + h1. Listener to a space lifecycle {anchor:id=SOCref.Developer_Ref.Developer_document_Space.Listener_to_a_space_lifecycle} -To receive notifications of what is happening in spaces, you need to extend SpaceListenerPlugin and register it. Every method takes a SpaceLifeCycleEvent object as parameter that contain the information about the event and it's context. +To receive notifications of what are happening in spaces, you need to extend _SpaceListenerPlugin_ and register it. Every method takes a _SpaceLifeCycleEvent_ object as a parameter that contains the information about the event and its context. -The events available are: +The available events are: -- spaceCreated: this event is called right after space is created successfully with its applications. -- spaceRemoved: this event is called right after a space is removed: application's removed, its group and group navigation is removed -- applicationAdded: this event is called right after an application is added (installed) to a space -- applicationActivated: this event is called right after an application is activated. -- applicationDeactivated: this event is called right after an application is deactivated. -- applicationRemoved: this event is called right after an application is removed from a space. -- joined: this event is called right after a user joins a space. -- left: this event is called right after a space member leaves its space. -- grantedLead: this event is called right after a user is grated space's manager role. -- revokedLead: this event is called right after a space's manager is revoked his role to be a space member. +* _spaceCreated_: This event is called right after a space is created successfully with its applications. +* _spaceRemoved_: This event is called right after the space is removed. It means all the applications of the space are removed, its group and group navigation are removed. +* _applicationAdded_: This event is called right after an application is added (installed) to the space. +* _applicationActivated_: This event is called right after an application is activated in the space. +* _applicationDeactivated_: This event is called right after an application is deactivated. +* _applicationRemoved_: This event is called right after an application is removed from the space. +* _joined_: This event is called right after a user joins the space. +* _left_: This event is called right after a space member leaves its space. +* _grantedLead_: This event is called right after a user is granted the space's manager role. +* _revokedLead_: This event is called right after the space's manager is revoked his role to be a space member. {code:java} import org.exoplatform.social.space.lifecycle.SpaceListenerPlugin; @@ -103,9 +107,9 @@ public class MySpaceListenerPlugin extends SpaceListenerPlugin { } {code} -As an example, see the [SpaceActivityPublisher|http://fisheye.exoplatform.org/browse/social/trunk/component/exosocial/src/main/java/org/exoplatform/social/space/SpaceActivityPublisher.java?r=HEAD] that publishes an activity based on an event that happened in a space. +As an example, see the SpaceActivityPublisher that publishes an activity based on an event that happened in a space. -To register your listener, hook it to the SpaceService like this : +To register your listener, hook it to the SpaceService like this: {code:xml} org.exoplatform.social.space.SpaceService diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developing_Open_Social_Gadgets.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developing_Open_Social_Gadgets.wiki index f1ca5c8861..e5774bbd1b 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developing_Open_Social_Gadgets.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Developing_Open_Social_Gadgets.wiki @@ -1,13 +1,11 @@ -h1. Developing OpenSocial Gadgets - +h1. Developing OpenSocial Gadgets {anchor:id=SOCref.DevelopingOpenSocialGadget} - -h1. Introduction -eXo Social with OpenSocial container based on apache shindig supports OpenSocial capability. So we can develop gadgets that use OpenSocial API to request OpenSocial data or deploy opensocial gadget using tool supported by portal. +h1. Introduction {anchor:id=SOCref.Developer_references.Introduction} +The Social function with OpenSocial container based on apache shindig supports OpenSocial capability. So you can develop gadgets that use OpenSocial API to request OpenSocial data or deploy opensocial gadget using tool supported by portal. To develop your gadgets, you can use the tool that supported by portal. -!createGadgets.png! +!images/createGadgets.png! h1. Development Parameters @@ -31,11 +29,11 @@ TODO, but you can look at this [demonstration|http://www.vimeo.com/2069512] h1. Developing OpenSocial Gadgets h1. Introduction -eXo Social with OpenSocial container based on apache shindig supports OpenSocial capability. So we can develop gadgets that use OpenSocial API to request OpenSocial data or deploy opensocial gadget using tool supported by portal. +The Social function with OpenSocial container based on apache shindig supports OpenSocial capability. So you can develop gadgets that use OpenSocial API to request OpenSocial data or deploy opensocial gadget using tool supported by portal. To develop your gadgets, you can use the tool that supported by portal. -!createGadgets.png! +!images/createGadgets.png! h1. Development Parameters diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Java_APIs.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Java_APIs.wiki index 13274c8c98..3b91348381 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Java_APIs.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Java_APIs.wiki @@ -1,168 +1,168 @@ h1. ActivityManager {anchor:id=Developer_document.Java_APIs.Activity_Manager} || Method || Param || Return || Description || -| *saveActivity*(Identity owner, Activity activity) | {{owner}} - the owner of activity stream, {{activity}} - the activity which needs to be saved |Activity| Saves an activity to the stream of a owner. Note that the Activity.userId will be set to the owner identity if not already set. | -| *getActivity*(java.lang.String activityId) | {{activityId}} - the id of activity | Activity | Gets an activity by activity id. | -| *deleteActivity*(java.lang.String activityId) | {{activityId}} - the id of activity | void | Deletes an activity by id. | -| *deleteComment*(java.lang.String activityId, java.lang.String commentId) | {{activityId}} - the id of activity, {{commentId}} - the id of comment | void | Deletes comment by id. | -| *getActivities*(Identity identity) | {{identity}} | List | Gets the latest activities by identity with the default limit of 20 latest activities. | -| *getActivities*(Identity identity, long start, long limit) | {{identity}}, {{start}} - the offset index , {{limit}} | List | Gets the latest activities by identity, specifying the start offset index and limit. | -| *getActivitiesOfConnections*(Identity ownerIdentity)| {{ownerIdentity}}| List| Gets activities of connections from an identity. The activities are sorted by time. The result list is maximum 30 activities by default. (Since 1.1.1). | -| *getActivitiesOfConnections*(Identity ownerIdentity, int offset, int limit)|{{ownerIdentity, limit, offset}}| List |Gets activities of connections from an identity by specifying offset and limit. The acivities are returned as a list that is sorted starting from the most recent activity. (Since 1.1.3).| -| *getActivitiesOfUserSpaces*(Identity ownerIdentity)| {{ownerIdentity}} | List | Gets the activities from all user's spaces.| -| *getActivityFeed*(Identity identity)|{{identity}}|List|Gets the activity feed of an identity. This feed is the combination of all the activities of his own activities, his connections' activities and his spaces' activities which are sorted by time. The latest activity is the first item in the activity list.| -| *saveActivity*(Activity activity) | {{activity}} - the activity which needs to be saved | activity | Saves the activity into the stream for the activity's userId. | -| *saveComment*(Activity activity, Activity comment) | {{activity}}, {{comment}} | void | Saves new or update comments to an activity comment which is an instance of Activity with mandatory properties: userId, title. | -| *saveLike*(Activity activity, Identity identity) | {{activity}}, {{identity}} | void | Saves an identity of user who likes the activity. | -| *removeLike*(Activity activity, Identity identity) | {{activity}}, {{identity}} - the identity of user who unlikes the activity |void | Removes the like activity, if this activity liked, remove, else does nothing. | -| *getComments*(Activity activity) | {{activity}} | comments | Gets an activity's commentList. | -| *recordActivity*(Identity owner, java.lang.String type, java.lang.String title, java.lang.String body) | {{owner}} - the owner of the target stream for this activity, {{type}} is the type of activity (freeform), {{title}}, {{body}}| stored activity | Records an activity. | -| *recordActivity*(Identity owner, Activity activity) | {{owner}}, {{activity}} | stored activity | Saves an activity. | -| *addProcessor*(ActivityProcessor processor, Adds a new processor}} | {{processor}}, {{addProcessorPlugin}} | void | Adds a new activity processor. | -| *addProcessorPlugin*(BaseActivityProcessorPlugin plugin) | {{plugin}} | void | Adds a new processor plug-in. | -| *getActivitiesCount*(Identity owner) |{{owner}} | int | Gets the number of activity from a stream owner. | +| *saveActivity* (Identity owner, Activity activity) | {{owner}} - the owner of activity stream, {{activity}} - the activity which needs to be saved |Activity| Save an activity to the stream of a owner. Note that the Activity.userId will be set to the owner identity if not already set. | +| *getActivity* (java.lang.String activityId) | {{activityId}} - the id of activity | Activity | Get an activity by activity Id. | +| *deleteActivity* (java.lang.String activityId) | {{activityId}} - the id of activity | void | Delete an activity by Id. | +| *deleteComment* (java.lang.String activityId, java.lang.String commentId) | {{activityId}} - the id of activity, {{commentId}} - the id of comment | void | Delete comment by Id. | +| *getActivities* (Identity identity) | {{identity}} | List | Get the latest activities by identity with the default limit of 20 latest activities. | +| *getActivities* (Identity identity, long start, long limit) | {{identity}}, {{start}} - the offset index , {{limit}} | List | Get the latest activities by identity, specifying the start offset index and limit. | +| *getActivitiesOfConnections* (Identity ownerIdentity)| {{ownerIdentity}}| List| Get activities of connections from an identity. The activities are sorted by time. The result list is maximum 30 activities by default. (Since 1.1.1). | +| *getActivitiesOfConnections* (Identity ownerIdentity, int offset, int limit)|{{ownerIdentity, limit, offset}}| List |Get activities of connections from an identity by specifying offset and limit. The acivities are returned as a list that is sorted starting from the most recent activity. (Since 1.1.3).| +| *getActivitiesOfUserSpaces* (Identity ownerIdentity)| {{ownerIdentity}} | List | Get the activities from all user's spaces.| +| *getActivityFeed* (Identity identity)|{{identity}}|List|Get the activity feed of an identity. This feed is the combination of all the activities of his own activities, his connections' activities and his spaces' activities which are sorted by time. The latest activity is the first item in the activity list.| +| *saveActivity* (Activity activity) | {{activity}} - the activity which needs to be saved | activity | Save the activity into the stream for the activity's userId. | +| *saveComment* (Activity activity, Activity comment) | {{activity}}, {{comment}} | void | Save new or update comments to an activity comment which is an instance of Activity with mandatory properties: userId, title. | +| *saveLike* (Activity activity, Identity identity) | {{activity}}, {{identity}} | void | Save an identity of user who likes the activity. | +| *removeLike* (Activity activity, Identity identity) | {{activity}}, {{identity}} - the identity of user who unlikes the activity |void | Remove the like activity. Liked activity will be moved. | +| *getComments* (Activity activity) | {{activity}} | comments | Get an activity's commentList. | +| *recordActivity* (Identity owner, java.lang.String type, java.lang.String title, java.lang.String body) | {{owner}} - the owner of the target stream for this activity, {{type}} is the type of activity (freeform), {{title}}, {{body}}| stored activity | Record an activity. | +| *recordActivity* (Identity owner, Activity activity) | {{owner}}, {{activity}} | stored activity | Save an activity. | +| *addProcessor* (ActivityProcessor processor, Add a new processor}} | {{processor}}, {{addProcessorPlugin}} | void | Add a new activity processor. | +| *addProcessorPlugin* (BaseActivityProcessorPlugin plugin) | {{plugin}} | void | Add a new processor plug-in. | +| *getActivitiesCount* (Identity owner) |{{owner}} | int | Get the number of activity from a stream owner. | h1. IdentityManager {anchor:id=Developer_document.Java_APIs.Identity_Manager} || Method || Param || Return || Description || -| *registerIdentityProviders(IdentityProviderPlugin plugin)* | {{plugin}}| |Registers one or more IdentityProvider through an IdentityProviderPlugin | -| *getIdentity*(String id) | {{id}} can be a social GlobalId or a raw identity such as in Identity.getId() | null if nothing is found, or the Identity object | Gets the identity by id and to load his profile. | -| *getIdentity*(String id, boolean loadProfile) | {{id}} can be a social GlobalId or a raw identity such as in Identity.getId(), {{loadProfile}} - the value is true if the profile is loaded and false if not loaded | null if nothing is found, or the Identity object | Gets the identity by loading id of the profile optionally. | -| *deleteIdentity*(Identity identity)| {{identity}}| void |Deletes an identity. | -| *addIdentityProvider*(IdentityProvider idProvider)| {{idProvider}} is the id of provider | void | Adds the id of provider. | -| *getIdentitiesCount*(String providerId) | {{providerId}}|long |Gets the number of identities. | -| *getOrCreateIdentity*(java.lang.String providerId, java.lang.String remoteId) | {{providerId}} is the id of provider, {{remoteId}} is the remote id | identity | Gets the identity by a remote id. | -| *getOrCreateIdentity*(java.lang.String providerId, java.lang.String remoteId, boolean loadProfile) | {{providerId}} - referring to the name of the Identity provider, {{remoteId}} - the identifier that identify the identity in the specific identity provider, {{loadProfile}} is true when the profile is loaded | null if nothing is found, or the Identity object TODO improves the performance by specifying what needs to be loaded | Returns an Identity object that is specific to a special type. For example, if the type is Linked'In, the identifier will be the URL of profile or if it is a CS contact manager contact, it will be the UID of the contact. A new identity is created if it doesnot exist. | -| *getIdentitiesByProfileFilter*(java.lang.String providerId, ProfileFilter profileFilter) throws Exception | {{providerId}} is the id of provider, {{profileFilter}} is the filter of provider | the identities by the profile filter | Gets the identities by profile filter.| -| *getIdentitiesByProfileFilter*(java.lang.String providerId, ProfileFilter profileFilter, long offset, long limit) throws Exception | {{providerId, profileFilter, offset, limit,}} | List | Gets the identities by profile filter.| -| *getIdentitiesByProfileFilter*(ProfileFilter profileFilter) throws Exception | {{profileFilter}} - the profile filter | the identities by profile filter | Gets the identities by profile filter. | -| *getIdentitiesByProfileFilter*(ProfileFilter profileFilter, long offset, long limit) throws Exception|{{profileFilter, offset, limit}} |List |Gets the identities by profile filter. | -| *getIdentitiesFilterByAlphaBet*(java.lang.String providerId, ProfileFilter profileFilter) throws Exception | {{providerId}} is the id of provider, {{profileFilter}} is the profile filter | the identities filter by alphabet | Gets the identities filter by alpha bet. | -| *getIdentitiesFilterByAlphaBet*(String providerId, ProfileFilter profileFilter, long offset, long limit) throws Exception |{{providerId, profileFilter, offset, limit}} |List| Gets the identities filter by alpha bet by specifying offset and limit.| -| *getIdentitiesFilterByAlphaBet*(ProfileFilter profileFilter) throws Exception | {{profileFilter}} - the profile filter | the identities filter by alphabet | Gets the identities filter by alphabet. | -| *getIdentity*(java.lang.String providerId, java.lang.String remoteId, boolean loadProfile) | {{providerId}}, {{remoteId}}, {{loadProfile}} | Identity | Gets the identity. | -| *identityExisted*(java.lang.String providerId, java.lang.String remoteId) | {{providerId}}, {{remoteId}} | boolean | Checks if the identity is already existed or not. | -| *saveIdentity*(Identity identity) | {{identity}} is the identity | void | Saves the identity. | -| *saveProfile*(Profile profile)|{{profile}}|void|Saves a profile.| -| *updateAvatar*(Profile p) throws Exception | {{p - profile}} | void | Updates avatar. | -| *updateBasicInfo*(Profile p) throws Exception | {{p - profile}} | Profile | Updates basic info of a profile. | -| *updateContactSection*(Profile p)throws Exception | {{p - profile}} | void | Updates the contact section of a profile. | -| *updateExperienceSection*(Profile p) throws Exception| {{p - profile}} | void | Updates the experience section of a profile. | -| *updateHeaderSection*(Profile p)throws Exception | {{p - profile}} | void | Updates the header section of profile. | -| *getIdentities*(java.lang.String providerId) throws Exception | {{providerId}} is the id of provider | List| Gets the identity. | -| *getIdentities*(java.lang.String providerId, boolean loadProfile) | {{providerId}} is the id of provider, {{loadProfile}} is the loaded profile. |List | Gets the identities. | -| *getConnections*(Identity ownerIdentity) throws Exception| {{ownerIdentity}} | List | Gets connections of an identity | -| *getStorage*() | {{N/A}} | IdentityStorage| Gets the storage. | -| *setIdentityStorage*(IdentityStorage identityStorage) | {{identityStorage}} | void | Sets identityStorage. | -| *registerProfileListener*(ProfileListener listener)unregisterProfileListener |{{listener}} |void | Registers a profile listener. | -| *unregisterProfileListener*(ProfileListener listener) | {{listener}} | void | Unregisters a profile listener. | -| *addProfileListener*(ProfileListenerPlugin plugin) | {{plugin}} | void | Registers a profile listener component plug-in. | -| *getIdentityStorage*() | {{N/A}} | IdentityStorage | Gets identity storage. | +| *registerIdentityProviders (IdentityProviderPlugin plugin)* | {{plugin}}| |Register one or more IdentityProvider through an IdentityProviderPlugin | +| *getIdentity*(String id) | {{id}} can be a social GlobalId or a raw identity such as in Identity.getId() | null if nothing is found, or the Identity object | Get the identity by Id and to load his profile. | +| *getIdentity*(String id, boolean loadProfile) | {{id}} can be a social GlobalId or a raw identity such as in Identity.getId(), {{loadProfile}} - the value is true if the profile is loaded and false if not loaded | null if nothing is found, or the Identity object | Get the identity by loading Id of the profile optionally. | +| *deleteIdentity*(Identity identity)| {{identity}}| void |Delete an identity. | +| *addIdentityProvider* (IdentityProvider idProvider)| {{idProvider}} is the Id of provider | void | Add the Id of provider. | +| *getIdentitiesCount* (String providerId) | {{providerId}}|long |Get the number of identities. | +| *getOrCreateIdentity* (java.lang.String providerId, java.lang.String remoteId) | {{providerId}} is the Id of provider, {{remoteId}} is the remote Id | identity | Get the identity by a remote Id. | +| *getOrCreateIdentity* (java.lang.String providerId, java.lang.String remoteId, boolean loadProfile) | {{providerId}} - referring to the name of the Identity provider, {{remoteId}} - the identifier that identify the identity in the specific identity provider, {{loadProfile}} is true when the profile is loaded | null if nothing is found, or the Identity object TODO improves the performance by specifying what needs to be loaded | Return an Identity object that is specific to a special type. For example, if the type is Linked'In, the identifier will be the URL of profile or if it is a CS contact manager contact, it will be the UID of the contact. A new identity is created if it doesnot exist. | +| *getIdentitiesByProfileFilter* (java.lang.String providerId, ProfileFilter profileFilter) throws Exception | {{providerId}} is the id of provider, {{profileFilter}} is the filter of provider | the identities by the profile filter | Get the identities by profile filter.| +| *getIdentitiesByProfileFilter* (java.lang.String providerId, ProfileFilter profileFilter, long offset, long limit) throws Exception | {{providerId, profileFilter, offset, limit,}} | List | Get the identities by profile filter.| +| *getIdentitiesByProfileFilter* (ProfileFilter profileFilter) throws Exception | {{profileFilter}} - the profile filter | the identities by profile filter | Get the identities by profile filter. | +| *getIdentitiesByProfileFilter* (ProfileFilter profileFilter, long offset, long limit) throws Exception|{{profileFilter, offset, limit}} |List |Get the identities by profile filter. | +| *getIdentitiesFilterByAlphaBet* (java.lang.String providerId, ProfileFilter profileFilter) throws Exception | {{providerId}} is the id of provider, {{profileFilter}} is the profile filter | the identities filter by alphabet | Get the identities filter by alpha bet. | +| *getIdentitiesFilterByAlphaBet* (String providerId, ProfileFilter profileFilter, long offset, long limit) throws Exception |{{providerId, profileFilter, offset, limit}} |List| Get the identities filter by alpha bet by specifying offset and limit.| +| *getIdentitiesFilterByAlphaBet* (ProfileFilter profileFilter) throws Exception | {{profileFilter}} - the profile filter | the identities filter by alphabet | Get the identities filter by alphabet. | +| *getIdentity* (java.lang.String providerId, java.lang.String remoteId, boolean loadProfile) | {{providerId}}, {{remoteId}}, {{loadProfile}} | Identity | Get the identity. | +| *identityExisted* (java.lang.String providerId, java.lang.String remoteId) | {{providerId}}, {{remoteId}} | boolean | Check if the identity is already existed or not. | +| *saveIdentity* (Identity identity) | {{identity}} is the identity | void | Save the identity. | +| *saveProfile* (Profile profile)|{{profile}}|void|Save a profile.| +| *updateAvatar* (Profile p) throws Exception | {{p - profile}} | void | Update avatar. | +| *updateBasicInfo* (Profile p) throws Exception | {{p - profile}} | Profile | Update basic info of a profile. | +| *updateContactSection* (Profile p)throws Exception | {{p - profile}} | void | Update the contact section of a profile. | +| *updateExperienceSection* (Profile p) throws Exception| {{p - profile}} | void | Update the experience section of a profile. | +| *updateHeaderSection* (Profile p)throws Exception | {{p - profile}} | void | Update the header section of profile. | +| *getIdentities* (java.lang.String providerId) throws Exception | {{providerId}} is the id of provider | List| Get the identity. | +| *getIdentities* (java.lang.String providerId, boolean loadProfile) | {{providerId}} is the id of provider, {{loadProfile}} is the loaded profile. |List | Get the identities. | +| *getConnections* (Identity ownerIdentity) throws Exception| {{ownerIdentity}} | List | Get connections of an identity | +| *getStorage*() | {{N/A}} | IdentityStorage| Get the storage. | +| *setIdentityStorage* (IdentityStorage identityStorage) | {{identityStorage}} | void | Set identityStorage. | +| *registerProfileListener* (ProfileListener listener)unregisterProfileListener |{{listener}} |void | Register a profile listener. | +| *unregisterProfileListener* (ProfileListener listener) | {{listener}} | void | Unregister a profile listener. | +| *addProfileListener* (ProfileListenerPlugin plugin) | {{plugin}} | void | Register a profile listener component plug-in. | +| *getIdentityStorage*() | {{N/A}} | IdentityStorage | Get identity storage. | h1. RelationshipManager {anchor:id=Developer_document.Java_APIs.Relationship_manager} || Method || Param || Return || Description || -|*getRelationshipById*(String id) throws Exception|{{id}}|Relationship |Gets relationship the by id.| -|*invite*(Identity currIdentity, Identity requestedIdentity) throws Exception|{{currIdentity}} - The current identity, {{requestedIdentity}} - The requested identity}}|Relationship|Creates a connection invitation between two identities.| -|*confirm*(Relationship relationship) throws Exception|{{relationship}}|void|Marks a relationship as confirmed.| -|*deny*(Relationship relationship) throws Exception|{{relationship}}|void|Denies a relationship.| -|*remove*(Relationship relationship) throws Exception|{{relationship}}|void|Removes a relationship.| -|*ignore*(Relationship relationship) throws Exception|{{relationship}}|void |Marks a relationship as ignored.| -|*getPendingRelationships*(Identity identity) throws Exception |{{identity}}|List|Returns all the pending relationships of the identity, including sent and received relationships of the pending type.| -|*getPendingRelationships*(Identity identity, boolean toConfirm) throws Exception|{{identity, toConfirm}}|List|If toConfirm is true, it returns a list of the pending relationship received, but not confirmed, if toConfirm is false, it returns a list of the relationship sent, but not confirmed yet.| -|*getPendingRelationships*(Identity currIdentity, List identities, boolean toConfirm) throws Exception|{{currIdentity}} - the current identity, {{identities}} - the identities, {{toConfirm}} - |List |Gets the pending relations in two cases:{example}{example} - If toConfirm is true, it returns a list of the pending relationships received, but not confirmed.{example}{example} - If toConfirm is false, it returns a list of the relationships sent, but not confirmed yet.| -|*getContacts*(Identity currIdentity, List identities) throws Exception|{{currIdentity}} - the current identity, {{identities}} - the identities, |List |Gets contacts that matches the search result.| -|*getContacts*(Identity identity) throws Exception|{{identity}}|List|Gets the contacts of the identity.| -|*getAllRelationships*(Identity identity) throws Exception|{{identity }}|List |Returns all the relationships associated with a given identity.| -|*getRelationshipsByIdentityId*(String id) throws Exception|{{id}}|List|Returns all the relationships associated with a given identityId.| -|*getIdentities*(Identity id) throws Exception|{{id}}|List |Returns all the identities associated with a given identity and checks whether the relation has been validated or not.| -|*create*(Identity sender, Identity receiver)|{{sender, receiver}}|Relationship |Creates the relationship.| -|*saveRelationship*(Relationship relationship) throws Exception|{{relationship}}|void|Saves the relationship.| -|*updateRelationshipCached*(Relationship relationship)|{{relationship}}|void|Updates the relationship cached.| -|*findRoute*(Identity sender, Identity receiver) throws NotSupportedException|{{sender,receiver}}|Relationship|Finds a route.| -|*findRelationships*(Identity ownerIdentity, Relationship.Type relationshipType) throws Exception|{{ownerIdentity, relationshipType}}|List | Finds all identities having relationshipType with the ownerIdentity.(Since 1.1.2).| -|*getRelationshipStatus*(Relationship rel, Identity id)|{{rel, id }}|Relationship.Type |Gets the relationship type of the relationship with the identity.| -|*getConnectionStatus*(Identity fromIdentity, Identity toIdentity) throws Exception|{{fromIdentity, toIdentity}}|Relationship.Type |Gets the connection type between two identities. (Since 1.1.1).| -|*registerListener*(RelationshipListener listener)|{{listener}}|void|Registers the RelationshipListener.| -|*unregisterListener*(RelationshipListener listener)|{{listener}}|void|Removes the RelationshipListener.| -|*addListenerPlugin*(RelationshipListenerPlugin plugin)|{{plugin}}|void| Adds the plugin.| +|*getRelationshipById* (String id) throws Exception|{{id}}|Relationship |Get relationship the by Id.| +|*invite* (Identity currIdentity, Identity requestedIdentity) throws Exception|{{currIdentity}} - The current identity, {{requestedIdentity}} - The requested identity}}|Relationship|Create a connection invitation between two identities.| +|*confirm* (Relationship relationship) throws Exception|{{relationship}}|void|Mark a relationship as confirmed.| +|*deny* (Relationship relationship) throws Exception|{{relationship}}|void|Deny a relationship.| +|*remove* (Relationship relationship) throws Exception|{{relationship}}|void|Remove a relationship.| +|*ignore* (Relationship relationship) throws Exception|{{relationship}}|void |Mark a relationship as ignored.| +|*getPendingRelationships* (Identity identity) throws Exception |{{identity}}|List|Return all the pending relationships of the identity, including sent and received relationships of the pending type.| +|*getPendingRelationships* (Identity identity, boolean toConfirm) throws Exception|{{identity, toConfirm}}|List|If toConfirm is true, it returns a list of the pending relationship received, but not confirmed, if toConfirm is false, it returns a list of the relationship sent, but not confirmed yet.| +|*getPendingRelationships* (Identity currIdentity, List identities, boolean toConfirm) throws Exception|{{currIdentity}} - the current identity, {{identities}} - the identities, {{toConfirm}} - |List |Get the pending relations in two cases:{example}{example} - If toConfirm is true, it returns a list of the pending relationships received, but not confirmed.{example}{example} - If toConfirm is false, it returns a list of the relationships sent, but not confirmed yet.| +|*getContacts* (Identity currIdentity, List identities) throws Exception|{{currIdentity}} - the current identity, {{identities}} - the identities, |List |Get contacts that matches the search result.| +|*getContacts* (Identity identity) throws Exception|{{identity}}|List|Get the contacts of the identity.| +|*getAllRelationships* (Identity identity) throws Exception|{{identity }}|List |Return all the relationships associated with a given identity.| +|*getRelationshipsByIdentityId* (String id) throws Exception|{{id}}|List|Return all the relationships associated with a given identityId.| +|*getIdentities* (Identity id) throws Exception|{{id}}|List |Return all the identities associated with a given identity and checks whether the relation has been validated or not.| +|*create* (Identity sender, Identity receiver)|{{sender, receiver}}|Relationship |Create the relationship.| +|*saveRelationship* (Relationship relationship) throws Exception|{{relationship}}|void|Save the relationship.| +|*updateRelationshipCached* (Relationship relationship)|{{relationship}}|void|Update the relationship cached.| +|*findRoute* (Identity sender, Identity receiver) throws NotSupportedException|{{sender,receiver}}|Relationship|Find a route.| +|*findRelationships* (Identity ownerIdentity, Relationship.Type relationshipType) throws Exception|{{ownerIdentity, relationshipType}}|List | Find all identities having relationshipType with the ownerIdentity.(Since 1.1.2).| +|*getRelationshipStatus* (Relationship rel, Identity id)|{{rel, id }}|Relationship.Type |Get the relationship type of the relationship with the identity.| +|*getConnectionStatus* (Identity fromIdentity, Identity toIdentity) throws Exception|{{fromIdentity, toIdentity}}|Relationship.Type |Get the connection type between two identities. (Since 1.1.1).| +|*registerListener* (RelationshipListener listener)|{{listener}}|void|Register the RelationshipListener.| +|*unregisterListener* (RelationshipListener listener)|{{listener}}|void|Remove the RelationshipListener.| +|*addListenerPlugin* (RelationshipListenerPlugin plugin)|{{plugin}}|void| Add the plugin.| h1. SpaceService {anchor:id=Developer_document.JavaAPIs.Java_APIs.SpaceService} || Method || Param || Return || Description || -|*getAllSpaces*() throws SpaceException|{{N/A}}|List - list of spaces in Social|Gets all spaces in Social.| -|*getSpaceByName*(String spaceName) throws SpaceException|{{spaceName}}|Space|Gets a space by its space name.| -|*getSpacesByFirstCharacterOfName*(String firstCharacterOfName) throws SpaceException|{{firstCharacterOfName}}| List - all spaces which have first character of name matched the input string.|Gets all spaces has the name starting with the input character.| -|*getSpacesBySearchCondition*(String condition) throws Exception|{{condition}} - the input condition| List - a list of spaces|Gets all spaces which has the name or the description that matches the input condition.| -|*getSpaceByGroupId*(String groupId) throws SpaceException,|{{groupId}} - the group id of the space| Space|Gets a space by its group id. | -|*getSpaceById*(String spaceId) throws SpaceException|{{spaceId}} - Id of that space|Space - space with the id specified|Gets a space by its id.| -|*getSpaceByUrl*(String spaceUrl) throws SpaceException|{{spaceUrl}} - url of space|Space - the space with string url specified|Gets a space by its url.| -|*getSpaces*(String userId) throws SpaceException|{{userId}} - Id of the user| List - all spaces of a user in which the user is a member|Gets spaces of a user in which that user is a member.| -|*getAccessibleSpaces*(String userId) throws SpaceException|{{userId}}| List - list of spaces|Gets spaces of a user which that user has the access permission| -|*getEditableSpaces*(String userId) throws SpaceException|{{userId}}| List - list of spaces|Gets spaces of a user which that user has the edit permission.| -|*getInvitedSpaces*(String userId) throws SpaceException|{{userId}}| List - spaces list of all user's invited spaces|Gets a user's invited spaces and that user can accept or deny the request.| -|*getPublicSpaces*(String userId) throws SpaceException|{{userId - Id of user}}|List - spaces list in which the user can request to join|Gets a user's public spaces and that user can request to join.| -|*getPendingSpaces*(String userId) throws SpaceException|{{userId}}| List - spaces list in which the user can revoke that request|Gets a user's pending spaces and that the user can revoke that request.| -|*createSpace*(Space space, String creator) throws SpaceException|{{space, creator}}|Space - the created space|Creates a new space by creating a new group.This new group will be under */Spaces* node.This is shorthand for calling createSpace(space, creator, null).| -|*createSpace*(Space space, String creator, String groupId) throws SpaceException|{{space, creator, groupId}} - if groupId == null: create a new space by creating a new group|Space|Creates a new space from an existing group.| -|*saveSpace*(Space space, boolean isNew) throws SpaceException|{{space - space is saved, isNew}} - true if creating a new space, otherwise, update an existing space.|void|Saves a new space or updates a space.| -|*deleteSpace*(Space space) throws SpaceException|{{space - the space is deleted}}|void|Deletes a space. When deleting a space, all of its page navigations and its group will be deleted.| -|*deleteSpace*(String spaceId) throws SpaceException|{{ spaceId}}|void|Deletes a space by its id.| -|*initApp*(Space space) throws SpaceException|{{space}}|void|Initializes default applications in a space. Deprecated, use *initApps*(Space) instead.| -|*initApps*(Space space) throws SpaceException|{{space}}|void|Initializes default applications in a space. Set *space.homeNodeApp* from the configuration file to be the root page of that space node. When removing a space, make sure to call *deInitApps*(Space) and then deleteSpace(Space) or *deleteSpace*(String)| -|*deInitApps*(Space space) throws SpaceException|{{space }}| void |De-initializes the applications of a space.Make sure to call this method before *deleteSpace*(Space) or *deleteSpace*(String). Otherwise, the space is deleted but its pages and navigation still exists.| -|*addMember*(Space space, String userId) throws SpaceException|{{}}|void|Adds a user to a space, the user will get the "member" role in a space.| -|*addMember*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|void|Adds a user to a space, the user will get the "member" role in a space.| -|*removeMember*(Space space, String userId) throws SpaceException|{{space, userId}}|void|Removes a member from a space. If the member is the only leader of that space, the member removed is not allowed and throws *SpaceException* with Code = USER_ONLY_LEADER.| -|*removeMember*?(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|void|Removes a member from a space.| -|*getMembers*(Space space) throws SpaceException|{{space}}| List - a list of the space members|Gets a list of the space members from a space.| -|*getMembers*(String spaceId) throws SpaceException|{{spaceId}}| List - a list of the space members| Gets a list of the space members from a space.| -|*setLeader*(Space space, String userId, boolean isLeader) throws SpaceException|{{space, userId, isLeader }}|void|Sets a member of a space as a manager.| -|*setLeader*(String spaceId, String userId, boolean isLeader) throws SpaceException|{{spaceId, userId, isLeader}}|void|Sets a member of a space as a manager.| -|*isLeader*(Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true if that the user is a leader, otherwise, false|Checks whether a user is a space's leader or not.| -|*isLeader*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean - true if that user is a leader, otherwise, false|Checks whether a user is a space's leader or not.| -|*isOnlyLeader*(Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true if that user is the only leader of the space, otherwise, false|Checks whether a user is the only leader of a space or not.| -|*isOnlyLeader*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean|Checks whether a user is the only leader of a space or not.| -|*isMember*(Space space, String userId) throws SpaceException|{{space, userId}}| boolean - true if that user is a member, otherwise, false|Checks whether a user is a space's member or not.| -|*isMember*(String spaceId, String userId) throws SpaceException|{{spaceId, userId, }}| boolean - true if that user is a member, otherwise,false|Checks whether a user is a space's member or not.| -|*hasAccessPermission*(Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true If the user is root or the space's member.|Checks if a user can access a space or not.| -|*hasAccessPermission*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean - true If the user is root or the space's member|Checks if a user can access a space or not.| -|*hasEditPermission*(Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true If the user is root or the space's manager|Checks if a user can have the edit permission of a space or not.| -|*hasEditPermission*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolen - true If user is root or the space's manager|Checks if a user can have the edit permission of a space or not.| -|*isInvited*(Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true if that user is in the invited list, otherwise, false|Checks if a user is in the invited list of a space or not.| -|*isInvited*(String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolen - true if the user is in the invited list, otherwise, false|Checks if a user is in the invited list of a space or not.| -|*isPending*(Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true if that user is in the pending list, otherwise, false|Checks if a user is in the pending list of a space or not.| -|*installApplication*(String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Installs an application to a space.| -|*installApplication*(Space space, String appId) throws SpaceException|{{space, appId}}|void | Installs an application to a space| -|*activateApplication*(Space space, String appId) throws SpaceException|{{space, appId}}| void| Activates an installed application in a space.| -|*activateApplication*(String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Activates an installed application in a space.| -|*deactivateApplication*(Space space, String appId) throws SpaceException|{{space, appId}}|void |Deactivates an installed application in a space.| -|*deactivateApplication*(String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Deactivates an installed application in a space.| -|*removeApplication*(Space space, String appId, String appName) throws SpaceException|{{space, appId, appName}}| void|Removes an installed application from a space.| -|*removeApplication*(String spaceId, String appId, String appName) throws SpaceException|{{space, appId, appName}}|void|Removes an installed application from a space.| -|*requestJoin*(Space space, String userId) throws SpaceException|{{space, userid}}| void |Requests a user to join a space, adds that user to the pending list of the space.| -|*requestJoin*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Requests a user to join a space, adds that user to the pending list of the space.| -|*revokeRequestJoin*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Revokes a join request after users request to join a group and is in the pending status.| -|*revokeRequestJoin*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Revokes a request to join a space.| -|*inviteMember*(Space space, String userId) throws SpaceException|{{space, userid}}| void |Invites a userId to become a member of a space.| -|*inviteMember*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Invites a userId to a be member of a space.| -|*revokeInvitation*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Revokes an invitation. Removes a user from the invited member list of the space.| -|*revokeInvitation*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Revokes an invitation. Removes a user from the invited member list of the space.| -|*acceptInvitation*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Accepts an invitation and moves a user from the invited list to the member list.| -|*acceptInvitation*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Accepts an invitation and moves a user from the invited list to the member list.| -|*denyInvitation*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Denies an invitation and removes a user from the invited list.| -|*denyInvitation*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Denies an invitation and removes a user from the invited list.| -|*validateRequest*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Validates a request and moves a user from the pending list to the member list.| -|*validateRequest*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Validates a request and moves a user from the pending list to the member list.| -|*declineRequest*(Space space, String userId) throws SpaceException|{{space, userid}}|void|Declines a request and removes a user from the pending list.| -|*declineRequest*(String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Declines a request and removes a user from the pending list.| -|*registerSpaceLifeCycleListener*(SpaceLifeCycleListener listener|{{listener}}|void|Registers a space lifecycle listener.| -|*unregisterSpaceLifeCycleListener*(SpaceLifeCycleListener listener)|{{listener}}|void|Unregisters a space lifecycle listener.| -|*setPortletsPrefsRequired*(PortletPreferenceRequiredPlugin portletPrefsRequiredPlugin)|{{portletPrefsRequiredPlugin}}|void| Sets the portlet preferences got from the plug-in configuration.| -|*getPortletsPrefsRequired*()|{{N/A}}|{{{String[]}}}|Gets the portlet preferences required to use in creating the portlet application.| -|*setSpaceApplicationConfigPlugin*(SpaceApplicationConfigPlugin spaceApplicationConfigPlugin)|{{SpaceApplicationConfigPlugin}}|void|Sets configuration plugin for initializing applications when creating a new space. (Since 1.1.3).| -|*getSpaceApplicationConfigPlugin*()|{{N/A}}|SpaceApplicationConfigPlugin|Gets the configuration of applications to be initialized when creating a new space. (Since 1.1.3).| +|*getAllSpaces*() throws SpaceException|{{N/A}}|List - list of spaces in Social|Get all spaces in Social.| +|*getSpaceByName* (String spaceName) throws SpaceException|{{spaceName}}|Space|Get a space by its space name.| +|*getSpacesByFirstCharacterOfName* (String firstCharacterOfName) throws SpaceException|{{firstCharacterOfName}}| List - all spaces which have first character of name matched the input string.|Get all spaces has the name starting with the input character.| +|*getSpacesBySearchCondition* (String condition) throws Exception|{{condition}} - the input condition| List - a list of spaces|Get all spaces which has the name or the description that matches the input condition.| +|*getSpaceByGroupId* (String groupId) throws SpaceException,|{{groupId}} - the group Id of the space| Space|Get a space by its group Id. | +|*getSpaceById* (String spaceId) throws SpaceException|{{spaceId}} - Id of that space|Space - space with the id specified|Get a space by its Id.| +|*getSpaceByUrl* (String spaceUrl) throws SpaceException|{{spaceUrl}} - url of space|Space - the space with string url specified|Get a space by its URL.| +|*getSpaces* (String userId) throws SpaceException|{{userId}} - Id of the user| List - all spaces of a user in which the user is a member|Get spaces of a user in which that user is a member.| +|*getAccessibleSpaces* (String userId) throws SpaceException|{{userId}}| List - list of spaces|Get spaces of a user which that user has the access permission| +|*getEditableSpaces* (String userId) throws SpaceException|{{userId}}| List - list of spaces|Get spaces of a user which that user has the edit permission.| +|*getInvitedSpaces* (String userId) throws SpaceException|{{userId}}| List - spaces list of all user's invited spaces|Get a user's invited spaces and that user can accept or deny the request.| +|*getPublicSpaces* (String userId) throws SpaceException|{{userId - Id of user}}|List - spaces list in which the user can request to join|Get a user's public spaces and that user can request to join.| +|*getPendingSpaces* (String userId) throws SpaceException|{{userId}}| List - spaces list in which the user can revoke that request|Get a user's pending spaces and that the user can revoke that request.| +|*createSpace* (Space space, String creator) throws SpaceException|{{space, creator}}|Space - the created space|Create a new space by creating a new group.This new group will be under */Spaces* node.This is shorthand for calling createSpace(space, creator, null).| +|*createSpace* (Space space, String creator, String groupId) throws SpaceException|{{space, creator, groupId}} - if groupId == null: create a new space by creating a new group|Space|Create a new space from an existing group.| +|*saveSpace* (Space space, boolean isNew) throws SpaceException|{{space - space is saved, isNew}} - true if creating a new space, otherwise, update an existing space.|void|Save a new space or updates a space.| +|*deleteSpace* (Space space) throws SpaceException|{{space - the space is deleted}}|void|Delete a space. When deleting a space, all of its page navigations and its group will be deleted.| +|*deleteSpace* (String spaceId) throws SpaceException|{{ spaceId}}|void|Delete a space by its Id.| +|*initApp* (Space space) throws SpaceException|{{space}}|void|Initialize default applications in a space. Deprecated, use *initApps*(Space) instead.| +|*initApps* (Space space) throws SpaceException|{{space}}|void|Initialize default applications in a space. Set *space.homeNodeApp* from the configuration file to be the root page of that space node. When removing a space, make sure to call *deInitApps*(Space) and then deleteSpace(Space) or *deleteSpace*(String)| +|*deInitApps* (Space space) throws SpaceException|{{space }}| void |De-initialize the applications of a space. Make sure to call this method before *deleteSpace*(Space) or *deleteSpace*(String). Otherwise, the space is deleted but its pages and navigation still exists.| +|*addMember* (Space space, String userId) throws SpaceException|{{}}|void|Add a user to a space, the user will get the "member" role in a space.| +|*addMember* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|void|Add a user to a space, the user will get the "member" role in a space.| +|*removeMember* (Space space, String userId) throws SpaceException|{{space, userId}}|void|Remove a member from a space. If the member is the only leader of that space, the member removed is not allowed and throws *SpaceException* with Code = USER_ONLY_LEADER.| +|*removeMember*? (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|void|Remove a member from a space.| +|*getMembers* (Space space) throws SpaceException|{{space}}| List - a list of the space members|Get a list of the space members from a space.| +|*getMembers* (String spaceId) throws SpaceException|{{spaceId}}| List - a list of the space members| Get a list of the space members from a space.| +|*setLeader* (Space space, String userId, boolean isLeader) throws SpaceException|{{space, userId, isLeader }}|void|Set a member of a space as a manager.| +|*setLeader* (String spaceId, String userId, boolean isLeader) throws SpaceException|{{spaceId, userId, isLeader}}|void|Set a member of a space as a manager.| +|*isLeader* (Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true if that the user is a leader, otherwise, false|Check whether a user is a space's leader or not.| +|*isLeader* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean - true if that user is a leader, otherwise, false|Check whether a user is a space's leader or not.| +|*isOnlyLeader* (Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true if that user is the only leader of the space, otherwise, false|Check whether a user is the only leader of a space or not.| +|*isOnlyLeader* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean|Check whether a user is the only leader of a space or not.| +|*isMember* (Space space, String userId) throws SpaceException|{{space, userId}}| boolean - true if that user is a member, otherwise, false|Check whether a user is a space's member or not.| +|*isMember* (String spaceId, String userId) throws SpaceException|{{spaceId, userId, }}| boolean - true if that user is a member, otherwise,false|Check whether a user is a space's member or not.| +|*hasAccessPermission* (Space space, String userId) throws SpaceException|{{space, userId}}|boolean - true If the user is root or the space's member.|Check if a user can access a space or not.| +|*hasAccessPermission* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolean - true If the user is root or the space's member|Check if a user can access a space or not.| +|*hasEditPermission* (Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true If the user is root or the space's manager|Check if a user can have the edit permission of a space or not.| +|*hasEditPermission* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolen - true If user is root or the space's manager|Check if a user can have the edit permission of a space or not.| +|*isInvited* (Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true if that user is in the invited list, otherwise, false|Check if a user is in the invited list of a space or not.| +|*isInvited* (String spaceId, String userId) throws SpaceException|{{spaceId, userId}}|boolen - true if the user is in the invited list, otherwise, false|Check if a user is in the invited list of a space or not.| +|*isPending* (Space space, String userId) throws SpaceException|{{space, userId}}|boolen - true if that user is in the pending list, otherwise, false|Check if a user is in the pending list of a space or not.| +|*installApplication* (String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Install an application to a space.| +|*installApplication* (Space space, String appId) throws SpaceException|{{space, appId}}|void | Install an application to a space| +|*activateApplication* (Space space, String appId) throws SpaceException|{{space, appId}}| void| Activate an installed application in a space.| +|*activateApplication* (String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Activate an installed application in a space.| +|*deactivateApplication* (Space space, String appId) throws SpaceException|{{space, appId}}|void |Deactivate an installed application in a space.| +|*deactivateApplication* (String spaceId, String appId) throws SpaceException|{{spaceId, appId}}|void|Deactivate an installed application in a space.| +|*removeApplication* (Space space, String appId, String appName) throws SpaceException|{{space, appId, appName}}| void|Remove an installed application from a space.| +|*removeApplication* (String spaceId, String appId, String appName) throws SpaceException|{{space, appId, appName}}|void|Remove an installed application from a space.| +|*requestJoin* (Space space, String userId) throws SpaceException|{{space, userid}}| void |Request a user to join a space, add that user to the pending list of the space.| +|*requestJoin* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Request a user to join a space, add that user to the pending list of the space.| +|*revokeRequestJoin* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Revoke a join request after users request to join a group and is in the pending status.| +|*revokeRequestJoin* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Revoke a request to join a space.| +|*inviteMember* (Space space, String userId) throws SpaceException|{{space, userid}}| void |Invite a userId to become a member of a space.| +|*inviteMember* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Invite a userId to a be member of a space.| +|*revokeInvitation* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Revoke an invitation. Remove a user from the invited member list of the space.| +|*revokeInvitation* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Revoke an invitation. Remove a user from the invited member list of the space.| +|*acceptInvitation* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Accept an invitation and moves a user from the invited list to the member list.| +|*acceptInvitation* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Accept an invitation and moves a user from the invited list to the member list.| +|*denyInvitation* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Deny an invitation and removes a user from the invited list.| +|*denyInvitation* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Deny an invitation and removes a user from the invited list.| +|*validateRequest* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Validate a request and moves a user from the pending list to the member list.| +|*validateRequest* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Validate a request and moves a user from the pending list to the member list.| +|*declineRequest* (Space space, String userId) throws SpaceException|{{space, userid}}|void|Decline a request and removes a user from the pending list.| +|*declineRequest* (String spaceId, String userId) throws SpaceException|{{spaceId, userid}}|void|Decline a request and removes a user from the pending list.| +|*registerSpaceLifeCycleListener* (SpaceLifeCycleListener listener|{{listener}}|void|Register a space lifecycle listener.| +|*unregisterSpaceLifeCycleListener* (SpaceLifeCycleListener listener)|{{listener}}|void|Unregister a space lifecycle listener.| +|*setPortletsPrefsRequired* (PortletPreferenceRequiredPlugin portletPrefsRequiredPlugin)|{{portletPrefsRequiredPlugin}}|void| Set the portlet preferences got from the plug-in configuration.| +|*getPortletsPrefsRequired* ()|{{N/A}}|{{{String[]}}}|Get the portlet preferences required to use in creating the portlet application.| +|*setSpaceApplicationConfigPlugin* (SpaceApplicationConfigPlugin spaceApplicationConfigPlugin)|{{SpaceApplicationConfigPlugin}}|void|Set configuration plugin for initializing applications when creating a new space. (Since 1.1.3).| +|*getSpaceApplicationConfigPlugin* ()|{{N/A}}|SpaceApplicationConfigPlugin|Get the configuration of applications to be initialized when creating a new space. (Since 1.1.3).| diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Javascript_APIs.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Javascript_APIs.wiki index be06f71890..a49d46e51c 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Javascript_APIs.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Javascript_APIs.wiki @@ -1 +1 @@ -All references for Opensocial Javascript APIs can be viewed [here|http://wiki.opensocial.org/index.php?title=JavaScript_API_Reference] +All references for Opensocial Javascript APIs can be viewed [here|http://wiki.opensocial.org/index.php?title=JavaScript_API_Reference]. diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Overrideable_components.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Overrideable_components.wiki index 468e1028c4..75ccfea50c 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Overrideable_components.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/Overrideable_components.wiki @@ -1,4 +1,4 @@ -There are 2 components in Social that can be overridden: Space Application Handler & Space Service +There are 2 components in the Social function that can be overridden: Space Application Handler & Space Service. * *Space Application Handler* {code:xml} diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/REST_APIs.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/REST_APIs.wiki index 4d6d769c4c..ac9b9ce229 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/REST_APIs.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/REST_APIs.wiki @@ -2,18 +2,18 @@ h1. Activities REST service {anchor:id=SOCref.Developer_references.ActivitiesRESTService} || Name || Service URL || Location || Description || -| *ActivitiesRestService* | {noformat}{restContextName}/{portalName}/social/activities{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provides REST services for activity applications, such as like/unlike, comment, delete activity.| +| *ActivitiesRestService* | {noformat}{restContextName}/ {portalName}/social/activities{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provide REST services for activity applications, such as like/unlike, comment, delete activity.| * *API*: || Name || Service URL Endpoint || Parameters || Expected Values|| Description || -| *destroyActivity* | {noformat}{restContextName}/{portalName}/social/activities/destroy/{activityId}.{format}{noformat} | portalName{example} activityId{example} format | String{example} String{example} String: json or xml | Destroys an activity and returns the json/xml format. | -| *showLikes* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/show.{format}{noformat} |portalName{example} activityId{example} format| String{example} String {example} String: json or xml| Shows the list of identityId who likes this activity and returns the json/xml format. | -| *updateLike* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/update.{format}{noformat} |portalName{example}{example} activityId{example}{example}format | String{example}{example} String{example}{example} String: json or xml| Updates the list of likes by the json/xml format. | -| *destroyLike* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/destroy/{identity}.{format}{noformat} | portalName{example}{example} activityId{example}{example} identityId{example}{example} format |String{example}{example} String {example}{example} String {example}{example} String: json or xml |Destroys *like* by identityId and returns the json/xml format.| -| *showComments* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/comments/show.{format}{noformat}| portalName{example}activityId {example} format| String{example}String {example}String: json or xml| Shows the comment list of an activity by the json/xml format. | -| *updateComment* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/comments/update.{format}{noformat} | portalName{example} activityId {example} format | String{example} String{example}String: json or xml | Updates the comment of an acitivity by the json/xml format. | -| *destroyComment* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/comments/destroy/{commentId}.{format}{noformat} | portalName{example}{example}activityId {example}{example} commentId{example}{example} format| String{example}{example} String{example}{example} String{example}{example} String: json or xml | Destroys the comment of an identity and returns the json/xml format. | +| *destroyActivity* | {noformat}{restContextName}/ {portalName}/social/activities/destroy/{activityId}.{format}{noformat} | portalName{example} activityId{example} format | String{example} String{example} String: json or xml | Destroy an activity and Return the json/xml format. | +| *showLikes* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/likes/show.{format}{noformat} |portalName{example} activityId{example} format| String{example} String {example} String: json or xml| Show the list of identityId who likes this activity and Return the json/xml format. | +| *updateLike* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/likes/update.{format}{noformat} |portalName{example}{example} activityId{example}{example}format | String{example}{example} String{example}{example} String: json or xml| Update the list of likes by the json/xml format. | +| *destroyLike* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/likes/destroy/{identity}.{format}{noformat} | portalName{example}{example} activityId{example}{example} identityId{example}{example} format |String{example}{example} String {example}{example} String {example}{example} String: json or xml |Destroy *like* by identityId and Return the json/xml format.| +| *showComments* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/comments/show.{format}{noformat}| portalName{example}activityId {example} format| String{example}String {example}String: json or xml| Show the comment list of an activity by the json/xml format. | +| *updateComment* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/comments/update.{format}{noformat} | portalName{example} activityId {example} format | String{example} String{example}String: json or xml | Update the comment of an acitivity by the json/xml format. | +| *destroyComment* | {noformat}{restContextName}/ {portalName}/social/activities/{activityId}/comments/destroy/{commentId}.{format}{noformat} | portalName{example}{example}activityId {example}{example} commentId{example}{example} format| String{example}{example} String{example}{example} String{example}{example} String: json or xml | Destroy the comment of an identity and Return the json/xml format. | Example: @@ -24,11 +24,11 @@ Example: h1. Apps REST service {anchor:id=SOCref.Developer_references.AppsRESTService} || Name || Service URL || Location ||Description || -| *AppsRestService* | {noformat}{restContextName}/social/apps{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provides REST services for showing the application list from the application registry gadget.| +| *AppsRestService* | {noformat}{restContextName}/social/ apps{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provide REST services for showing the application list from the application registry gadget.| * *API*: || Name || Service URL Endpoint || Parameters || Expected Values||Description || -| *showApps* | {noformat}{restContextName}/social/apps/show.{format}{noformat} | format| String: json or xml |Shows applications by the json/xml format. | +| *showApps* | {noformat}{restContextName} /social/apps/show.{format}{noformat} | format| String: json or xml |Show applications by the json/xml format. | Example: @@ -36,11 +36,11 @@ http://localhost:9090/rest-socialdemo/apps/show.json h1. Identity REST service {anchor:id=SOCref.Developer_references.IdentityRESTService} || Name || Service URL || Location|| Description || -| *IdentityRestService* | {noformat}{restContextName}/{portalName}/social/identity/{username}/id{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Gets identityId by the username. | +| *IdentityRestService* | {noformat}{restContextName}/ {portalName}/social/ identity/{username}/id{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Get identityId by the username. | * *API*: || Name || Service URL Endpoint || Parameters || Expected Values ||Description || -| *getId* | {noformat}{restContextName}/{portalName}/social/identity/{username}/id/show.json{noformat} |username{example}{example} portalname | String{example}{example} String |Gets the identity by username and returns by the json format. | +| *getId* | {noformat}{restContextName}/ {portalName}/social/ identity/{username}/id/show.json{noformat} |username{example}{example} portalname | String{example}{example} String |Get the identity by username and Return by the json format. | Example: @@ -49,12 +49,12 @@ http://localhost:8080/rest-socialdemo/socialdemo/social/identity/john/id/show.js h1. Linkshare REST service {anchor:id=SOCref.Developer_references.LinkshareRESTService} || Name || Service URL || Location || Description || -|*LinkshareRestService* | {noformat}{restContextName}/social/linkshare{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provides REST service for getting metadata information, such as page title, images, and description from a provided link. | +|*LinkshareRestService* | {noformat}{restContextName}/social/ linkshare{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provide REST service for getting metadata information, such as page title, images, and description from a provided link. | * *API*: || Name || Service URL Endpoint ||Parameters || Expected Values|| Description | -| *getLink* | {noformat}{restContextName}/social/linkshare/show.{format}{noformat} | format | String: json or xml |Gets the provided link metadat by posting a linkShare request as post data. | +| *getLink* | {noformat}{restContextName} /social/linkshare/show. {format}{noformat} | format | String: json or xml |Get the provided link metadat by posting a linkShare request as post data. | Example: @@ -62,12 +62,12 @@ http://localhost:9090/rest-socialdemo/social/linkshare/show.json h1. People REST Service {anchor:id=SOCref.Developer_references.PeopleRestService} || Name || Service URL || Location || Description || -| *PeopleRestService* | {noformat}{restContextName}/social/people{noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service | Provides REST services for serving requests related to people, such as suggesting username, getting people information. | +| *PeopleRestService* | {noformat}{restContextName} /social/people{noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component. service | Provide REST services for serving requests related to people, such as suggesting username, getting people information. | * *API*: || Name || Service URL Endpoint || Parameters || Expected Values|| Description || -|*suggestUsernames*|{noformat}{restContextName}/social/people/suggest.{format}{noformat}|nameToSearch {example}{example} currentUser {example}{example} typeOfRelation {example}{example} spaceURL {example}{example} portalName {example}{example}format|String {example}{example} String {example}{example} String {example}{example} String {example}{example} String {example}{example} String|Gets and returns a list of users's full names that matches the input string for suggesting.| -|*getPeopleInfo*|{noformat}{restContextName}/social/people/{portalName}/{currentUserName}/getPeopleInfo/{userId}.{format}{noformat}|portalName {example}currentUserName{example} userId{example} format{example} updatedType| String {example} String {example} String{example}String: json or xml {example} String |Gets and returns information of people that is displayed as users's detailed information on pop-up.| +|*suggestUsernames*|{noformat}{restContextName} /social/people/ suggest. {format}{noformat}|nameToSearch {example}{example} currentUser {example}{example} typeOfRelation {example}{example} spaceURL {example}{example} portalName {example}{example}format|String {example}{example} String {example}{example} String {example}{example} String {example}{example} String {example}{example} String|Get and Return a list of users's full names that matches the input string for suggesting.| +|*getPeopleInfo*|{noformat}{restContextName} /social/people /{portalName}/{currentUserName} /getPeopleInfo/{userId}.{format}{noformat}|portalName {example}currentUserName{example} userId{example} format{example} updatedType| String {example} String {example} String{example}String: json or xml {example} String |Get and Return information of people that is displayed as users's detailed information on pop-up.| Example: @@ -75,13 +75,13 @@ http://localhost:8080/rest-socialdemo/social/people/suggest.json?nameToSearch=ro h2. Spaces REST service {anchor:id=SOCref.Developer_references.SpacesRESTService} || Name || Service URL || Location || Description || -| *SpacesRestService* | {noformat}{restContextName}/{portalName}/social/spaces{noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provides REST services for space gadget to display user's spaces and pending spaces | +| *SpacesRestService* | {noformat}{restContextName} /{portalName}/social/spaces{noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service |Provide REST services for space gadget to display user's spaces and pending spaces. | * *API*: || Name || Service URL Endpoint ||Parameters || Expected Values|| Description || -| *showMySpaceList* | {noformat}{restContextName}/social/spaces/mySpaces/show.{format}{noformat}|portalName{example}{example} format| String{example}{example} String: json or xml | Shows mySpaceList by the json/xml format. | -| *showPendingSpaceList* | {noformat}{restContextName}/social/spaces/pendingSpaces/show.{format}{noformat}| portalName{example}{example} format| String{example}{example} String: json or xml |Shows pendingSpaceList by the json/xml format.| -| *suggestSpacenames*|{noformat}{restContextName}/social/spaces/suggest.{format}{noformat}|portalName{example}conditionToSearch{example} typeOfRelation {example} currentUser {example} format| String{example} String{example} String{example} String{example} String: json or xml | Returns space's names that match the input string for suggesting.| +| *showMySpaceList* | {noformat}{restContextName} /social/spaces /mySpaces/show.{format}{noformat}|portalName{example}{example} format| String{example}{example} String: json or xml | Show mySpaceList by the json/xml format. | +| *showPendingSpaceList* | {noformat}{restContextName} /social/spaces /pendingSpaces/show.{format}{noformat}| portalName{example}{example} format| String{example}{example} String: json or xml |Show pendingSpaceList by the json/xml format.| +| *suggestSpacenames*|{noformat}{restContextName} /social/spaces /suggest.{format}{noformat}|portalName{example}conditionToSearch{example} typeOfRelation {example} currentUser {example} format| String{example} String{example} String{example} String{example} String: json or xml | Return space's names that match the input string for suggesting.| Example: @@ -89,12 +89,12 @@ http://localhost:8080/rest-socialdemo/social/spaces/s08d397dg6/mySpaces/show.xml h2. Widget REST service {anchor:id=SOCref.Developer_references.WidgetRESTService} || Name || Service URL || Location || Description || -| *WidgetRestService* | {noformat}{restContextName}/spaces/{containerName}{noformat}|*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.extras.widget.rest |Provides REST services for creating spaces or getting spaces'information. | +| *WidgetRestService* | {noformat}{restContextName} /spaces/{containerName}{noformat}|*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.extras.widget.rest |Provide REST services for creating spaces or getting spaces'information. | * *API*: || Name || Service URL Endpoint || Parameters || Expected Values|| Description || -| *goToSpace* | {noformat}{restContextName}/spaces/{containerName}/go_to_space{noformat}|containerName {example}{example} portalName{example}{example} spaceName{example}{example} description| String{example}{example} String (Defauult Value: classic) {example}{example} String {example}{example} String | Creates (if not existing) or accesses a space. Two query parameters needed: {{spaceName}} and {{description}} | -| *spaceInfo* | {noformat}{restContextName}/spaces/{containerName}/space_info{noformat}|containerName{example}{example} portalName{example}{example} spaceName{example}{example} description| String {example}{example} String (Default Value: classic){example}{example} String| Returns the HTML page for displaying the information of space. Two query parameters needed: {{spaceName}} and {{description}} | +| *goToSpace* | {noformat}{restContextName} /spaces /{containerName}/go_to_space{noformat}|containerName {example}{example} portalName{example}{example} spaceName{example}{example} description| String{example}{example} String (Defauult Value: classic) {example}{example} String {example}{example} String | Create (if not existing) or accesses a space. Two query parameters needed: {{spaceName}} and {{description}} | +| *spaceInfo* | {noformat}{restContextName} /spaces /{containerName}/space_info{noformat}|containerName{example}{example} portalName{example}{example} spaceName{example}{example} description| String {example}{example} String (Default Value: classic){example}{example} String| Return the HTML page for displaying the information of space. Two query parameters needed: {{spaceName}} and {{description}} | Example: diff --git a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/widget_tutorial.wiki b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/widget_tutorial.wiki index c4f5be5400..38e51c7081 100644 --- a/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/widget_tutorial.wiki +++ b/docs/refguide/src/main/resources/wikbook/en/en-US/DeveloperReference/widget_tutorial.wiki @@ -1,6 +1,6 @@ -The eXo Social widget enables developers to add capabilities of eXo Social to external applications. Since the widget is hosted on your eXo Social server, it can display personalized information. An activity stream of the most recent user actions will display to the group's members. +The Social widget enables developers to add capabilities of the Social to external applications. Since the widget is hosted on your Social server, it can display personalized information. An activity stream of the most recent user actions will display to the group's members. -There are two options of the eXo Social widget that provide different levels of integration and information. +There are two options of the Social widget that provide different levels of integration and information. The basic version of this widget is an iFrame. The more advanced version is a button you can insert in a page; this will display a small pop-up with information about the space. @@ -13,9 +13,9 @@ To insert the basic version, you need to have an iFrame to insert on your site. {code} To install this version in your application, replace all the uppercase text below: -* URL_OF_YOUR_EXO_INSTALLATION.COM - this is the URL of your eXo Social installation. If you are testing on your local computer, the URL may be _localhost:8080_ -* NAME_OF_YOUR_SPACE - this is the title of your space in eXo Social. In the URL, it is necessary to avoid special characters. For the space name, you can only use alphanumeric characters and "_", ".", "-" or ". " -* DESCRIPTION_OF_THE_SPACE - this will be displayed in the list of spaces. +* URL_OF_YOUR_EXO_INSTALLATION.COM: This is the URL of your Social installation. If you are testing on your local computer, the URL may be _localhost:8080_. +* NAME_OF_YOUR_SPACE: This is the title of your space in Social. In the URL, it is necessary to avoid special characters. For the space name, you can only use alphanumeric characters and "_", ".", "-" or ". ". +* DESCRIPTION_OF_THE_SPACE: This will be displayed in the list of spaces. h1. Advanced version {anchor:id=SOCref.DeveloperReference.widget_tutorial.advanced_version} @@ -29,10 +29,12 @@ Next, insert the following code at the position you want the button to be displa {code} -The important function here is: +The important function is: {code} spaces.createPopup(link, spaceName, description) {code} + +In which: * link: link is the ID or the HTMLElement where the pop-up will be placed. If you copy and paste the code snippet provided above, you donot need to change this value. * spaceName: This is the name of space. It is also used to identify the space. We recommend you use the following format: "MyAppName - my social object" * description: This is the description of your space that will be displayed within eXo Spaces. It is used when a new space is created. diff --git a/docs/refguide/src/main/resources/wikbook/images/LookAndFeelSpaceActivity.png b/docs/refguide/src/main/resources/wikbook/images/LookAndFeelSpaceActivity.png index 69de53e6f6..760bbec85b 100644 Binary files a/docs/refguide/src/main/resources/wikbook/images/LookAndFeelSpaceActivity.png and b/docs/refguide/src/main/resources/wikbook/images/LookAndFeelSpaceActivity.png differ diff --git a/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-custom.png b/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-custom.png index 22fdf72b91..23ba7b29b5 100644 Binary files a/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-custom.png and b/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-custom.png differ diff --git a/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-default.png b/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-default.png index ef133d1d3c..adc4493bec 100644 Binary files a/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-default.png and b/docs/refguide/src/main/resources/wikbook/images/SimpleSpaceActivity-default.png differ diff --git a/docs/refguide/src/main/resources/wikbook/images/spaces.png b/docs/refguide/src/main/resources/wikbook/images/spaces.png index 96c7224e8b..739612c5b9 100644 Binary files a/docs/refguide/src/main/resources/wikbook/images/spaces.png and b/docs/refguide/src/main/resources/wikbook/images/spaces.png differ