Class UserRest
java.lang.Object
org.exoplatform.social.rest.impl.user.UserRest
- All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer,org.picocontainer.Startable
public class UserRest
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer, 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 Stringstatic final List<org.exoplatform.portal.rest.UserFieldValidator> static final org.exoplatform.portal.rest.UserFieldValidator -
Constructor Summary
ConstructorsConstructorDescriptionUserRest(ActivityRest 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.services.thumbnail.ImageThumbnailService imageThumbnailService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.commons.api.settings.SettingService settingService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddUser(javax.ws.rs.core.UriInfo uriInfo, jakarta.servlet.http.HttpServletRequest request, String expand, UserEntity model) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsedeleteUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand) 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.ResponsegetUserCardSettings(javax.ws.rs.core.Request request) javax.ws.rs.core.ResponsegetUsers(javax.ws.rs.core.UriInfo uriInfo, String q, boolean searchEmail, boolean searchUsername, String status, String userType, String isConnected, List<Long> spaceIds, boolean isDisabled, String enrollmentStatus, int offset, int limit, boolean returnSize, String expand, boolean excludeCurrentUser) 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, String q, String wildcardSearch, boolean excludeCurrentUser) javax.ws.rs.core.ResponseimportUsers(jakarta.servlet.http.HttpServletRequest request, String uploadId, boolean progress, boolean clean, boolean sync) javax.ws.rs.core.ResponsesendOnBoardingEmail(jakarta.servlet.http.HttpServletRequest request, String id) voidstop()javax.ws.rs.core.ResponseupdateUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, UserEntity model) javax.ws.rs.core.ResponseupdateUserProfileAttribute(jakarta.servlet.http.HttpServletRequest request, String username, String name, String value) javax.ws.rs.core.ResponseupdateUserProfileAttributes(jakarta.servlet.http.HttpServletRequest request, String username, List<ProfilePropertySettingEntity> profilePropertySettingEntities) javax.ws.rs.core.ResponseupdateUserProfileAttributes(jakarta.servlet.http.HttpServletRequest request, String username, ProfileEntity profileEntity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.picocontainer.Startable
start
-
Field Details
-
PROFILE_DEFAULT_BANNER_URL
- See Also:
-
PROFILE_DEFAULT_AVATAR_URL
- See Also:
-
USER_CARD_SETTINGS
- 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
-
UserRest
public UserRest(ActivityRest 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.services.thumbnail.ImageThumbnailService imageThumbnailService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.commons.api.settings.SettingService settingService)
-
-
Method Details
-
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, List<Long> spaceIds, boolean isDisabled, String enrollmentStatus, int offset, int limit, boolean returnSize, String expand, boolean excludeCurrentUser) throws Exception - 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, String q, String wildcardSearch, boolean excludeCurrentUser) throws Exception- Throws:
Exception
-
addUser
@RolesAllowed("users") public javax.ws.rs.core.Response addUser(@Context javax.ws.rs.core.UriInfo uriInfo, @Context jakarta.servlet.http.HttpServletRequest request, String expand, UserEntity model) throws Exception - 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 - 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 jakarta.servlet.http.HttpServletRequest request, String username, String name, String value) throws IOException - Throws:
IOException
-
updateUserProfileAttributes
public javax.ws.rs.core.Response updateUserProfileAttributes(@Context jakarta.servlet.http.HttpServletRequest request, String username, ProfileEntity profileEntity) throws Exception - Throws:
Exception
-
updateUserProfileAttributes
public javax.ws.rs.core.Response updateUserProfileAttributes(@Context jakarta.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 - 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 - Throws:
Exception
-
sendOnBoardingEmail
@RolesAllowed("users") public javax.ws.rs.core.Response sendOnBoardingEmail(@Context jakarta.servlet.http.HttpServletRequest request, String id) throws Exception - Throws:
Exception
-
bulk
@RolesAllowed("users") public javax.ws.rs.core.Response bulk(@Context jakarta.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 - 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 - Throws:
Exception
-
getPendingOfUser
public javax.ws.rs.core.Response getPendingOfUser(@Context javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand) throws Exception - 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 - 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
-
importUsers
@RolesAllowed("administrators") public javax.ws.rs.core.Response importUsers(@Context jakarta.servlet.http.HttpServletRequest request, String uploadId, boolean progress, boolean clean, boolean sync) -
getUserCardSettings
@RolesAllowed("users") public javax.ws.rs.core.Response getUserCardSettings(@Context javax.ws.rs.core.Request request)
-