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

    Fields
    Modifier and Type
    Field
    Description
    static final org.exoplatform.portal.rest.UserFieldValidator
     
    static final org.exoplatform.portal.rest.UserFieldValidator
     
    static final org.exoplatform.portal.rest.UserFieldValidator
     
    static final org.exoplatform.portal.rest.UserFieldValidator
     
    static final String
     
    static final String
     
    static final String
     
    static final List<org.exoplatform.portal.rest.UserFieldValidator>
     
    static final org.exoplatform.portal.rest.UserFieldValidator
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    addActivityByUser(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model)
    Deprecated.
    javax.ws.rs.core.Response
    addUser(javax.ws.rs.core.UriInfo uriInfo, String expand, UserEntity model)
     
    javax.ws.rs.core.Response
    bulk(jakarta.servlet.http.HttpServletRequest request, String action, List<String> users)
     
    javax.ws.rs.core.Response
    deleteUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand)
     
    javax.ws.rs.core.Response
    getActivitiesOfUser(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.Response
    getCommonSpacesOfUser(javax.ws.rs.core.UriInfo uriInfo, String userId, String profileId, int offset, int limit, boolean returnSize, String expand)
     
    javax.ws.rs.core.Response
    getConnectionsOfUser(javax.ws.rs.core.UriInfo uriInfo, String id, String q, boolean returnSize, String expand)
     
    javax.ws.rs.core.Response
    getInvitationsOfUser(javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand)
     
    javax.ws.rs.core.Response
    getPendingOfUser(javax.ws.rs.core.UriInfo uriInfo, boolean returnSize, String expand)
     
    javax.ws.rs.core.Response
    getSpacesOfUser(javax.ws.rs.core.UriInfo uriInfo, String id, int offset, int limit, boolean returnSize, String expand)
     
    javax.ws.rs.core.Response
    getUserAvatarById(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.Response
    getUserBannerById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, boolean byId, String lastModified, String token)
     
    javax.ws.rs.core.Response
    getUserByEmail(javax.ws.rs.core.UriInfo uriInfo, String email)
     
    javax.ws.rs.core.Response
    getUserById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, String expand)
     
    javax.ws.rs.core.Response
    getUserCardSettings(javax.ws.rs.core.Request request)
     
    javax.ws.rs.core.Response
    getUsers(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)
     
    javax.ws.rs.core.Response
    getUsersOrConnectionsByAdvancedFilter(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.Response
    importUsers(jakarta.servlet.http.HttpServletRequest request, String uploadId, boolean progress, boolean clean, boolean sync)
     
    javax.ws.rs.core.Response
    sendOnBoardingEmail(jakarta.servlet.http.HttpServletRequest request, String id)
     
    void
     
    javax.ws.rs.core.Response
    updateUserById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, UserEntity model)
     
    javax.ws.rs.core.Response
    updateUserProfileAttribute(jakarta.servlet.http.HttpServletRequest request, String username, String name, String value)
     
    javax.ws.rs.core.Response
    updateUserProfileAttributes(jakarta.servlet.http.HttpServletRequest request, String username, List<ProfilePropertySettingEntity> profilePropertySettingEntities)
     
    javax.ws.rs.core.Response
    updateUserProfileAttributes(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, wait

    Methods inherited from interface org.picocontainer.Startable

    start
  • Field Details

    • PROFILE_DEFAULT_BANNER_URL

      public static final String PROFILE_DEFAULT_BANNER_URL
      See Also:
    • PROFILE_DEFAULT_AVATAR_URL

      public static final String PROFILE_DEFAULT_AVATAR_URL
      See Also:
    • USER_CARD_SETTINGS

      public static final String 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

      public static final List<org.exoplatform.portal.rest.UserFieldValidator> 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:
      stop in interface org.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
      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, 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
    • 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 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)