org.exoplatform.social.service.rest
Class PeopleRestService

java.lang.Object
  extended by org.exoplatform.social.service.rest.PeopleRestService
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class PeopleRestService
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Provides REST Services for manipulating jobs relates to people.


Nested Class Summary
static class PeopleRestService.ConnectionInfoRestOut
           
static class PeopleRestService.PeopleInfo
          PeopleInfo class.
static class PeopleRestService.UserInfo
           
static class PeopleRestService.UserNameList
          UserNameList class.
 
Constructor Summary
PeopleRestService()
           
 
Method Summary
 javax.ws.rs.core.Response getPeopleInfo(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, String userId, String format, String currentUserName, String updatedType)
          Gets a set of information of the target user.
 javax.ws.rs.core.Response getPeopleInfo(javax.ws.rs.core.UriInfo uriInfo, String portalName, String currentUserName, String userId, String format, String updatedType)
          Deprecated. Will be removed in eXo Platform 4.0.x
 org.exoplatform.social.core.space.spi.SpaceService getSpaceService()
           
 javax.ws.rs.core.Response searchConnection(javax.ws.rs.core.UriInfo uriInfo, String portalName, String nameToSearch, int offset, int limit, String lang, String format)
          Gets the information of people who have had connection with the current user.
 javax.ws.rs.core.Response suggestUsernames(javax.ws.rs.core.UriInfo uriInfo, String query)
          Gets users' information that matches the input string.
 javax.ws.rs.core.Response suggestUsernames(javax.ws.rs.core.UriInfo uriInfo, String name, String currentUser, String typeOfRelation, String spaceURL, String format)
          Gets users' names that match the input string for suggestion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeopleRestService

public PeopleRestService()
Method Detail

suggestUsernames

public javax.ws.rs.core.Response suggestUsernames(@Context
                                                  javax.ws.rs.core.UriInfo uriInfo,
                                                  String name,
                                                  String currentUser,
                                                  String typeOfRelation,
                                                  String spaceURL,
                                                  String format)
                                           throws Exception
Gets users' names that match the input string for suggestion.

Parameters:
uriInfo - The requested URI information.
name - The provided characters to be searched.
currentUser - The user who sends request.
typeOfRelation - The relationship status such as "confirmed", "pending", "incoming", "member_of_space" or "user_to_invite"
spaceURL - The URL of the related space.
format - The format of the returned result, for example, JSON, or XML.
Returns:
A list of users' names that match the input string.
Throws:
Exception

suggestUsernames

public javax.ws.rs.core.Response suggestUsernames(@Context
                                                  javax.ws.rs.core.UriInfo uriInfo,
                                                  String query)
                                           throws Exception
Gets users' information that matches the input string.

Parameters:
uriInfo - The request URI information.
query - The name of the user to filter.
Returns:
Users' information that matches the input string.
Throws:
Exception

searchConnection

public javax.ws.rs.core.Response searchConnection(@Context
                                                  javax.ws.rs.core.UriInfo uriInfo,
                                                  String portalName,
                                                  String nameToSearch,
                                                  int offset,
                                                  int limit,
                                                  String lang,
                                                  String format)
                                           throws Exception
Gets the information of people who have had connection with the current user.

Parameters:
uriInfo - The requested URI information.
format - The format of the returned result, for example, JSON, or XML.
portalName - The name of current portal.
nameToSearch - The name of user who wants to get.
offset - The starting point of the returned result.
limit - The ending point of the returned result.
lang - The locale type.
Returns:
The information of people who have had connection with the current user and the information must match with the input condition (name to search).
Throws:
Exception

getPeopleInfo

public javax.ws.rs.core.Response getPeopleInfo(@Context
                                               javax.ws.rs.core.UriInfo uriInfo,
                                               String portalName,
                                               String currentUserName,
                                               String userId,
                                               String format,
                                               String updatedType)
                                        throws Exception
Deprecated. Will be removed in eXo Platform 4.0.x

Gets the detailed information of a user on the pop-up, based on his/her username.

Parameters:
uriInfo - The requested URI information.
format - The format of the returned result, for example, JSON, or XML.
portalName - The name of the current portal container.
currentUserName - The current user name who sends request.
userId - The specific user Id.
updatedType - The type of connection action shown on the pop-up.
Returns:
The detailed information of a user.
Throws:
Exception

getPeopleInfo

public javax.ws.rs.core.Response getPeopleInfo(@Context
                                               javax.ws.rs.core.UriInfo uriInfo,
                                               @Context
                                               javax.ws.rs.core.SecurityContext securityContext,
                                               String userId,
                                               String format,
                                               String currentUserName,
                                               String updatedType)
                                        throws Exception
Gets a set of information of the target user. The returned information of the user includes full name, position avatar, link to profile and relationship status with the current user who sends request.

Parameters:
uriInfo - The requested URI information.
securityContext - The security context of the system.
userId - The Id of a specific user.
format - The format of the returned result, for example, JSON, or XML.
currentUserName - The current user name who sends request.
updatedType - The type of connection action shown on the pop-up.
Returns:
The detailed information of a user.
Throws:
Exception

getSpaceService

public org.exoplatform.social.core.space.spi.SpaceService getSpaceService()


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.