|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.web.RESTWebService
com.silverpeas.profile.web.UserProfileResource
@Service @RequestScoped @Authenticated public class UserProfileResource
A REST-based Web service that acts on the user profiles in Silverpeas. Each provided method is a way to access a representation of one or several user profile. This representation is vehiculed as a Web entity in the HTTP requests and responses. The users that are published depend on some parameters whose the domain isolation and the profile of the user behind the requesting. The domain isolation defines the visibility of a user or a group of users in a given domain to the others domains in Silverpeas.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService |
---|
RESTWebService.WebProcess<RETURN_VALUE>, RESTWebService.WebTreatment<RETURN_VALUE> |
Field Summary | |
---|---|
static String |
QUERY_ALL_GROUPS
Specific identifier of a user group meaning all the user groups in Silverpeas. |
static String |
RESPONSE_HEADER_USERSIZE
The HTTP header parameter that provides the real size of the user profiles that match a query. |
Fields inherited from class com.silverpeas.web.RESTWebService |
---|
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE |
Constructor Summary | |
---|---|
UserProfileResource()
Creates a new instance of UserProfileResource |
Method Summary | |
---|---|
UserProfileEntity |
checkUserToken()
|
javax.ws.rs.core.Response |
getApplicationUsers(String instanceId,
String groupId,
String roles,
String resource,
String name,
String page,
Set<UserState> userStatesToExclude)
Gets the profiles of the users that have access to the specified Silverpeas component instance and that matches the specified optional query parameters. |
String |
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to. |
UserProfileEntity |
getUser(String userId,
boolean extended)
Gets the profile on the user that is identified by the unique identifier refered by the URI. |
javax.ws.rs.core.Response |
getUserContacts(String userId,
String instanceId,
String roles,
String resource,
String name,
String page,
String domain,
Set<UserState> userStatesToExclude)
Gets the profile on the user that is identified by the unique identifier refered by the URI. |
javax.ws.rs.core.Response |
getUsers(Set<String> userIds,
String groupId,
String name,
String page,
String domain,
Set<UserAccessLevel> accessLevels,
Set<UserState> userStatesToExclude)
Gets the users defined in Silverpeas and that matches the specified optional query parameters. |
protected static URI |
identifiedBy(URI uri)
|
protected static URI |
locatedAt(URI uri)
|
Methods inherited from class com.silverpeas.web.RESTWebService |
---|
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESPONSE_HEADER_USERSIZE
public static final String QUERY_ALL_GROUPS
Constructor Detail |
---|
public UserProfileResource()
Method Detail |
---|
public UserProfileEntity checkUserToken()
public javax.ws.rs.core.Response getUsers(Set<String> userIds, String groupId, String name, String page, String domain, Set<UserAccessLevel> accessLevels, Set<UserState> userStatesToExclude)
userIds
- requested user identifiersgroupId
- the unique identifier of the group the users must belong to. The particular
identifier "all" means all user groups.name
- a pattern the name of the users has to satisfy. The wildcard * means anything
string of characters.page
- the pagination parameters formatted as "page number;item count in the page". From
this parameter is computed the part of users to sent back: those between ((page number - 1) *
item count in the page) and ((page number - 1) * item count in the page + item count in the
page).domain
- the unique identifier of the domain the users have to be related.accessLevels
- filters the users by the access level in Silverpeas.userStatesToExclude
- the user states that users taken into account must not be in.
public UserProfileEntity getUser(String userId, boolean extended)
userId
- the unique identifier of the user.extended
- more user details (full details).
public javax.ws.rs.core.Response getApplicationUsers(String instanceId, String groupId, String roles, String resource, String name, String page, Set<UserState> userStatesToExclude)
instanceId
- the unique identifier of the component instance the users should have access
to.groupId
- the unique identifier of the group the users must belong to. The particular
identifier "all" means all user groups.roles
- the name of the roles the users must play either for the component instance or for
a given resource of the component instance.resource
- the unique identifier of the resource in the component instance the users to
get must have enough rights to access. This query filter is coupled with the roles
one. If it is not set, by default the resource refered is the whole component instance. As for
component instance identifier, a resource one is defined by its type followed by its
identifier.name
- a pattern the name of the users has to satisfy. The wildcard * means anything
string of characters.page
- the pagination parameters formatted as "page number;item count in the page". From
this parameter is computed the part of users to sent back: those between ((page number - 1) *
item count in the page) and ((page number - 1) * item count in the page + item count in the
page).userStatesToExclude
- the user states that users taken into account must not be in.
public javax.ws.rs.core.Response getUserContacts(String userId, String instanceId, String roles, String resource, String name, String page, String domain, Set<UserState> userStatesToExclude)
userId
- the unique identifier of the user or me to refers the current user at the
origin of the request.instanceId
- the unique identifier of the component instance the users should have access
to.roles
- the name of the roles the users must play either for the component instance or for
a given resource of the component instance.resource
- the unique identifier of the resource in the component instance the users to
get must have enough rights to access. This query filter is coupled with the roles
one. If it is not set, by default the resource refered is the whole component instance. As for
component instance identifier, a resource one is defined by its type followed by its
identifier.name
- a pattern the name of the users has to satisfy. The wildcard * means anything
string of characters.page
- the pagination parameters formatted as "page number;item count in the page". From
this parameter is computed the part of users to sent back: those between ((page number - 1) *
item count in the page) and ((page number - 1) * item count in the page + item count in the
page).domain
- the unique identifier of the domain the users have to be related.userStatesToExclude
- the user states that users taken into account must not be in.
public String getComponentId()
RESTWebService
getComponentId
in class RESTWebService
protected static URI locatedAt(URI uri)
protected static URI identifiedBy(URI uri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |