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

PeopleRestService.java < /br> Provides REST Services for manipulating jobs relates to people. Url template: {rest_context_name}/social/people
GET: /{rest_context_name}/social/people/suggest.{format}


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 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 by 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 and returns list people's information that have had connection with current viewer.
 javax.ws.rs.core.Response suggestUsernames(javax.ws.rs.core.UriInfo uriInfo, String query)
          Gets and returns list of user's name that match the input string for suggesting.
 javax.ws.rs.core.Response suggestUsernames(javax.ws.rs.core.UriInfo uriInfo, String name, String currentUser, String typeOfRelation, String spaceURL, String format)
          Gets and returns list of user's name that match the input string for suggesting.
 
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 and returns list of user's name that match the input string for suggesting.

Parameters:
uriInfo - The request URI information.
format - The response format type, for example: JSON, or XML.
name - The provided characters to be searched.
Returns:
list of user's name 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 and returns list of user's name that match the input string for suggesting.

Parameters:
uriInfo - The request URI information.
format - The response format type, for example: JSON, or XML.
name - The provided characters to be searched.
Returns:
list of user's name that matched 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 and returns list people's information that have had connection with current viewer.

Parameters:
uriInfo - The request URI information.
format - The response format type, for example: JSON, or XML.
portalName - The name of current portal.
nameToSearch - The name of user who want to get.
offset - Start point of returned result.
limit - End point of returned result.
lang - The locale type.
Returns:
list people's information.
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 by 4.0.x

Gets and returns information of people that are displayed as detail user's information on popup.

Parameters:
uriInfo - The request URI information.
format - The response format type, for example: JSON, or XML.
portalName - The name of current portal container.
currentUserName - The name of user who sends request.
userId - Id of user is specified.
update -
Returns:
Information of people appropriate focus 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 target user. Returned information of user such as: full name, position avatar, link to profile and relationship status with user who sends request.

Parameters:
uriInfo - The request URI information.
securityContextThe - security context.
userId - The id of specific user.
formatThe - response format type, for example: JSON, or XML.
currentUserName - The user name who sends request.
updatedType - The provided type of update.
Returns:
Information of people appropriate focus user.
Throws:
Exception

getSpaceService

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


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