Class UserRestResourcesV1
java.lang.Object
org.exoplatform.social.rest.impl.user.UserRestResourcesV1
- All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer,SocialRest,UserRestResources,org.picocontainer.Startable
public class UserRestResourcesV1
extends Object
implements UserRestResources, org.picocontainer.Startable
Provides REST Services for manipulating jobs related to users.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.exoplatform.portal.rest.UserFieldValidatorstatic final org.exoplatform.portal.rest.UserFieldValidatorstatic final org.exoplatform.portal.rest.UserFieldValidatorstatic final org.exoplatform.portal.rest.UserFieldValidatorstatic final Stringstatic final Stringstatic final List<org.exoplatform.portal.rest.UserFieldValidator>static final org.exoplatform.portal.rest.UserFieldValidator -
Constructor Summary
ConstructorsConstructorDescriptionUserRestResourcesV1(ActivityRestResourcesV1 activityRestResourcesV1, org.exoplatform.portal.config.UserACL userACL, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.RelationshipManager relationshipManager, org.exoplatform.services.user.UserStateService userStateService, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.organization.search.UserSearchService userSearchService, org.exoplatform.social.metadata.thumbnail.ImageThumbnailService imageThumbnailService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService, org.exoplatform.services.resources.LocaleConfigService localeConfigService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddActivityByUser(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model) Deprecated.javax.ws.rs.core.ResponseaddUser(javax.ws.rs.core.UriInfo uriInfo, String expand, UserEntity model) Creates an userjavax.ws.rs.core.Responsejavax.ws.rs.core.ResponsedeleteUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand) javax.ws.rs.core.ResponsegetActivitiesOfUser(javax.ws.rs.core.UriInfo uriInfo, String id, String type, int offset, int limit, String before, String after, boolean returnSize, String expand) Deprecated.javax.ws.rs.core.ResponsegetCommonSpacesOfUser(javax.ws.rs.core.UriInfo uriInfo, String userId, String profileId, int offset, int limit, boolean returnSize, String expand) javax.ws.rs.core.ResponsegetConnectionsOfUser(javax.ws.rs.core.UriInfo uriInfo, String id, String q, boolean returnSize, String expand) javax.ws.rs.core.ResponsegetInvitationsOfUser(javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand) javax.ws.rs.core.ResponsegetPendingOfUser(javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand) javax.ws.rs.core.ResponsegetSpacesOfUser(javax.ws.rs.core.UriInfo uriInfo, String id, int offset, int limit, boolean returnSize, String expand) javax.ws.rs.core.ResponsegetUserAvatarById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, boolean byId, String lastModified, String size, String token) javax.ws.rs.core.ResponsegetUserBannerById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, boolean byId, String lastModified, String token) javax.ws.rs.core.ResponsegetUserByEmail(javax.ws.rs.core.UriInfo uriInfo, String email) javax.ws.rs.core.ResponsegetUserById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, String expand) javax.ws.rs.core.ResponsegetUsers(javax.ws.rs.core.UriInfo uriInfo, String q, boolean searchEmail, boolean searchUsername, String status, String userType, String isConnected, String spaceId, boolean isDisabled, String enrollmentStatus, int offset, int limit, boolean returnSize, String expand, boolean excludeCurrentUser) Get all users, filter by name if exists.javax.ws.rs.core.ResponsegetUsersOrConnectionsByAdvancedFilter(javax.ws.rs.core.UriInfo uriInfo, String userType, String filterType, boolean isDisabled, int offset, int limit, boolean returnSize, String expand, Map<String, String> settings) javax.ws.rs.core.ResponseimportUsers(javax.servlet.http.HttpServletRequest request, String uploadId, boolean progress, boolean clean, boolean sync) javax.ws.rs.core.ResponsesendOnBoardingEmail(javax.servlet.http.HttpServletRequest request, String id) voidstart()voidstop()javax.ws.rs.core.ResponseupdateUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, UserEntity model) javax.ws.rs.core.ResponseupdateUserProfileAttribute(javax.servlet.http.HttpServletRequest request, String username, String name, String value) javax.ws.rs.core.ResponseupdateUserProfileAttributes(javax.servlet.http.HttpServletRequest request, String username, List<ProfilePropertySettingEntity> profilePropertySettingEntities) javax.ws.rs.core.ResponseupdateUserProfileAttributes(javax.servlet.http.HttpServletRequest request, String username, ProfileEntity profileEntity)
-
Field Details
-
PROFILE_DEFAULT_BANNER_URL
- See Also:
-
PROFILE_DEFAULT_AVATAR_URL
- See Also:
-
USERNAME_VALIDATOR
public static final org.exoplatform.portal.rest.UserFieldValidator USERNAME_VALIDATOR -
EMAIL_VALIDATOR
public static final org.exoplatform.portal.rest.UserFieldValidator EMAIL_VALIDATOR -
LASTNAME_VALIDATOR
public static final org.exoplatform.portal.rest.UserFieldValidator LASTNAME_VALIDATOR -
FIRSTNAME_VALIDATOR
public static final org.exoplatform.portal.rest.UserFieldValidator FIRSTNAME_VALIDATOR -
PASSWORD_VALIDATOR
public static final org.exoplatform.portal.rest.UserFieldValidator PASSWORD_VALIDATOR -
USER_FIELD_VALIDATORS
-
-
Constructor Details
-
UserRestResourcesV1
public UserRestResourcesV1(ActivityRestResourcesV1 activityRestResourcesV1, org.exoplatform.portal.config.UserACL userACL, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.RelationshipManager relationshipManager, org.exoplatform.services.user.UserStateService userStateService, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.organization.search.UserSearchService userSearchService, org.exoplatform.social.metadata.thumbnail.ImageThumbnailService imageThumbnailService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService, org.exoplatform.services.resources.LocaleConfigService localeConfigService)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
getUsers
@RolesAllowed("users") public javax.ws.rs.core.Response getUsers(@Context javax.ws.rs.core.UriInfo uriInfo, String q, boolean searchEmail, boolean searchUsername, String status, String userType, String isConnected, String spaceId, boolean isDisabled, String enrollmentStatus, int offset, int limit, boolean returnSize, String expand, boolean excludeCurrentUser) throws Exception Description copied from interface:UserRestResourcesGet all users, filter by name if exists.- Specified by:
getUsersin interfaceUserRestResourcesq- value that an user's name matchstatus- filter only online usersuserType- filter by user typeisConnected- filter by connected usersspaceId- filter only space membersisDisabled- only disabled usersenrollmentStatus- filter by enrollment status- Returns:
- List of users in json format.
- Throws:
Exception
-
getUsersOrConnectionsByAdvancedFilter
@RolesAllowed("users") public javax.ws.rs.core.Response getUsersOrConnectionsByAdvancedFilter(@Context javax.ws.rs.core.UriInfo uriInfo, String userType, String filterType, boolean isDisabled, int offset, int limit, boolean returnSize, String expand, Map<String, String> settings) throws Exception- Throws:
Exception
-
addUser
@RolesAllowed("users") public javax.ws.rs.core.Response addUser(@Context javax.ws.rs.core.UriInfo uriInfo, String expand, UserEntity model) throws Exception Description copied from interface:UserRestResourcesCreates an user- Specified by:
addUserin interfaceUserRestResources- Returns:
- user created in json format
- Throws:
Exception
-
getUserById
@RolesAllowed("users") public javax.ws.rs.core.Response getUserById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String id, String expand) throws Exception - Specified by:
getUserByIdin interfaceUserRestResources- Throws:
Exception
-
getUserByEmail
@RolesAllowed("users") public javax.ws.rs.core.Response getUserByEmail(@Context javax.ws.rs.core.UriInfo uriInfo, String email) throws org.json.JSONException - Throws:
org.json.JSONException
-
getUserAvatarById
public javax.ws.rs.core.Response getUserAvatarById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String id, boolean byId, String lastModified, String size, String token) throws IOException - Throws:
IOException
-
getUserBannerById
public javax.ws.rs.core.Response getUserBannerById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String id, boolean byId, String lastModified, String token) throws IOException - Throws:
IOException
-
updateUserProfileAttribute
public javax.ws.rs.core.Response updateUserProfileAttribute(@Context javax.servlet.http.HttpServletRequest request, String username, String name, String value) throws IOException - Throws:
IOException
-
updateUserProfileAttributes
public javax.ws.rs.core.Response updateUserProfileAttributes(@Context javax.servlet.http.HttpServletRequest request, String username, ProfileEntity profileEntity) throws Exception - Throws:
Exception
-
updateUserProfileAttributes
public javax.ws.rs.core.Response updateUserProfileAttributes(@Context javax.servlet.http.HttpServletRequest request, String username, List<ProfilePropertySettingEntity> profilePropertySettingEntities) throws Exception - Throws:
Exception
-
deleteUserById
@RolesAllowed("users") public javax.ws.rs.core.Response deleteUserById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand) throws Exception - Specified by:
deleteUserByIdin interfaceUserRestResources- Throws:
Exception
-
updateUserById
@RolesAllowed("users") public javax.ws.rs.core.Response updateUserById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, UserEntity model) throws Exception - Specified by:
updateUserByIdin interfaceUserRestResources- Throws:
Exception
-
sendOnBoardingEmail
@RolesAllowed("users") public javax.ws.rs.core.Response sendOnBoardingEmail(@Context javax.servlet.http.HttpServletRequest request, String id) throws Exception - Throws:
Exception
-
bulk
@RolesAllowed("users") public javax.ws.rs.core.Response bulk(@Context javax.servlet.http.HttpServletRequest request, String action, List<String> users) throws Exception - Throws:
Exception
-
getConnectionsOfUser
@RolesAllowed("users") public javax.ws.rs.core.Response getConnectionsOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String q, boolean returnSize, String expand) throws Exception - Specified by:
getConnectionsOfUserin interfaceUserRestResources- Throws:
Exception
-
getInvitationsOfUser
@RolesAllowed("users") public javax.ws.rs.core.Response getInvitationsOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand) throws Exception - Specified by:
getInvitationsOfUserin interfaceUserRestResources- Throws:
Exception
-
getPendingOfUser
public javax.ws.rs.core.Response getPendingOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand) throws Exception - Specified by:
getPendingOfUserin interfaceUserRestResources- Throws:
Exception
-
getSpacesOfUser
@RolesAllowed("users") public javax.ws.rs.core.Response getSpacesOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, String id, int offset, int limit, boolean returnSize, String expand) throws Exception - Specified by:
getSpacesOfUserin interfaceUserRestResources- Throws:
Exception
-
getCommonSpacesOfUser
@RolesAllowed("users") public javax.ws.rs.core.Response getCommonSpacesOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, String userId, String profileId, int offset, int limit, boolean returnSize, String expand) throws Exception - Throws:
Exception
-
addActivityByUser
@RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response addActivityByUser(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model) throws Exception Deprecated.- Throws:
Exception
-
getActivitiesOfUser
@RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response getActivitiesOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String type, int offset, int limit, String before, String after, boolean returnSize, String expand) throws Exception Deprecated.- Throws:
Exception
-
importUsers
@RolesAllowed("administrators") public javax.ws.rs.core.Response importUsers(@Context javax.servlet.http.HttpServletRequest request, String uploadId, boolean progress, boolean clean, boolean sync)
-