Class Users
- java.lang.Object
-
- org.gcube.portal.social.networking.ws.methods.v2.Users
-
@Path("2/users") public class Users extends ObjectREST interface for the social networking library (users).
-
-
Constructor Summary
Constructors Constructor Description Users()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.core.ResponseexistUser(String username)Deprecated.javax.ws.rs.core.ResponsegetAllUserNames()javax.ws.rs.core.ResponsegetFullnamesAndUsernames()Get the map of couples username/fullname of the users belonging to a given contextjavax.ws.rs.core.ResponsegetUserEmail()Read the user's email address.javax.ws.rs.core.ResponsegetUserFullname()Read the user's fullname.javax.ws.rs.core.ResponsegetUsernamesByGlobalRole(String roleName)Get the list of users having a given global-role, e.g.javax.ws.rs.core.ResponsegetUsernamesByRole(String roleName)javax.ws.rs.core.ResponsegetUserOAuthProfile()javax.ws.rs.core.ResponsegetUserProfile()Get the profile associated to the tokenjavax.ws.rs.core.ResponsereadCustomAttr(String attributeKey)Read a user's custom attribute.
-
-
-
Method Detail
-
readCustomAttr
@GET @Path("get-custom-attribute/") @Produces("application/json") public javax.ws.rs.core.Response readCustomAttr(@QueryParam("attribute") @NotNull(message="attribute name is missing") String attributeKey) throws javax.validation.ValidationExceptionRead a user's custom attribute. The user is the one owning the token- Parameters:
attributeKey- The key of the attribute to be read- Returns:
- the user's custom attribute
- Throws:
javax.validation.ValidationException
-
getUserFullname
@GET @Path("get-fullname") @Produces("application/json") public javax.ws.rs.core.Response getUserFullname()Read the user's fullname. The user is the one owning the token- Returns:
- the user's fullname
-
getUserEmail
@GET @Path("get-email") @Produces("application/json") public javax.ws.rs.core.Response getUserEmail()Read the user's email address. The user is the one owning the token- Returns:
- rhe user's email address
-
getUserProfile
@GET @Path("get-profile") @Produces("application/json") public javax.ws.rs.core.Response getUserProfile()Get the profile associated to the token- Returns:
- the user's profile. The user is the one owning the token
-
getUserOAuthProfile
@GET @Path("get-oauth-profile") @Produces("application/json") public javax.ws.rs.core.Response getUserOAuthProfile()- Returns:
- the user's profile compliant with oauth
-
getAllUserNames
@GET @Path("get-all-usernames") @Produces("application/json") public javax.ws.rs.core.Response getAllUserNames()- Returns:
- the list of usernames for the user belonging to the context linked to the provided auth token
-
getFullnamesAndUsernames
@GET @Path("get-all-fullnames-and-usernames") @Produces("application/json") public javax.ws.rs.core.Response getFullnamesAndUsernames()Get the map of couples username/fullname of the users belonging to a given context- Returns:
- the map of couples username/fullname of the users belonging to the context linked to the provided token.
-
getUsernamesByGlobalRole
@GET @Path("get-usernames-by-global-role") @Produces("application/json") public javax.ws.rs.core.Response getUsernamesByGlobalRole(@QueryParam("role-name") String roleName)Get the list of users having a given global-role, e.g. 'Administrator'. (Legacy)- Parameters:
roleName- the name of the role to be checked (e.g. Administrator)- Returns:
- the list of users having a given global-role
-
getUsernamesByRole
@GET @Path("get-usernames-by-role") @Produces("application/json") public javax.ws.rs.core.Response getUsernamesByRole(@QueryParam("role-name") String roleName)- Parameters:
roleName- the role name- Returns:
- the usernames having the role in the VRE
-
existUser
@GET @Path("user-exists") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response existUser(@QueryParam("username") String username)Deprecated.
-
-