Package org.exoplatform.portal.rest
Class UserRestResourcesV1
java.lang.Object
org.exoplatform.portal.rest.UserRestResourcesV1
- All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer
public class UserRestResourcesV1
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final intstatic final UserFieldValidatorstatic final UserFieldValidatorstatic final UserFieldValidatorstatic final Stringstatic final Stringstatic final UserFieldValidatorstatic final Stringstatic final Stringstatic final UserFieldValidatorstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionUserRestResourcesV1(org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.services.organization.search.UserSearchService userSearchService, UserACL userACL, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsechangePassword(jakarta.servlet.http.HttpServletRequest request, String username, String currentPassword, String newPassword) javax.ws.rs.core.ResponseconfirmSession(jakarta.servlet.http.HttpServletRequest request, String otpCode) javax.ws.rs.core.ResponsecreateUser(jakarta.servlet.http.HttpServletRequest request, UserRestEntity userEntity) javax.ws.rs.core.ResponsedeleteUser(jakarta.servlet.http.HttpServletRequest request, String userName) static Stringjavax.ws.rs.core.Responsejavax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetUserMemberships(String userName, String groupId, boolean includeNestedGroups, int offset, int limit, boolean returnSize) javax.ws.rs.core.Responsebooleanjavax.ws.rs.core.Responsejavax.ws.rs.core.ResponseisSynchronizedUserAllowedToChangePassword(javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponseupdateUser(jakarta.servlet.http.HttpServletRequest request, UserRestEntity userEntity)
-
Field Details
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMIT- See Also:
-
PASSWORD_UNKNOWN_ERROR_CODE
- See Also:
-
USER_NOT_FOUND_ERROR_CODE
- See Also:
-
WRONG_USER_PASSWORD_ERROR_CODE
- See Also:
-
CHANGE_PASSWORD_NOT_ALLOWED
- See Also:
-
UNCHANGED_NEW_PASSWORD_ERROR_CODE
- See Also:
-
CREATION_SOURCE_UI
- See Also:
-
OTP_CODE_INVALID
- See Also:
-
USERNAME_VALIDATOR
-
EMAIL_VALIDATOR
-
LASTNAME_VALIDATOR
-
FIRSTNAME_VALIDATOR
-
PASSWORD_VALIDATOR
-
-
Constructor Details
-
UserRestResourcesV1
public UserRestResourcesV1(org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.services.organization.search.UserSearchService userSearchService, UserACL userACL, org.exoplatform.web.login.recovery.PasswordRecoveryService passwordRecoveryService)
-
-
Method Details
-
getUsers
@RolesAllowed("administrators") public javax.ws.rs.core.Response getUsers(String q, String status, int offset, int limit, boolean returnSize) throws Exception - Throws:
Exception
-
createUser
@RolesAllowed("administrators") public javax.ws.rs.core.Response createUser(@Context jakarta.servlet.http.HttpServletRequest request, UserRestEntity userEntity) throws Exception - Throws:
Exception
-
getOnboardingSettings
@RolesAllowed("administrators") public javax.ws.rs.core.Response getOnboardingSettings() -
updateUser
@RolesAllowed("users") public javax.ws.rs.core.Response updateUser(@Context jakarta.servlet.http.HttpServletRequest request, UserRestEntity userEntity) throws Exception - Throws:
Exception
-
deleteUser
@RolesAllowed("administrators") public javax.ws.rs.core.Response deleteUser(@Context jakarta.servlet.http.HttpServletRequest request, String userName) throws Exception - Throws:
Exception
-
getUser
@RolesAllowed("users") public javax.ws.rs.core.Response getUser(@Context javax.ws.rs.core.UriInfo uriInfo, String id) throws Exception - Throws:
Exception
-
changePassword
-
confirmSession
@RolesAllowed("users") public javax.ws.rs.core.Response confirmSession(@Context jakarta.servlet.http.HttpServletRequest request, String otpCode) -
getUserMemberships
@RolesAllowed("users") public javax.ws.rs.core.Response getUserMemberships(String userName, String groupId, boolean includeNestedGroups, int offset, int limit, boolean returnSize) throws Exception - Throws:
Exception
-
isSuperUser
@RolesAllowed("users") public javax.ws.rs.core.Response isSuperUser() -
isSynchronizedUserAllowedToChangePassword
@RolesAllowed("users") public javax.ws.rs.core.Response isSynchronizedUserAllowedToChangePassword(@Context javax.ws.rs.core.UriInfo uriInfo) throws Exception - Throws:
Exception
-
getCurrentUsername
-
isMemberOfAdminGroup
public boolean isMemberOfAdminGroup()
-