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 intstatic final UserFieldValidatorstatic final UserFieldValidatorstatic final UserFieldValidatorstatic 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.ResponsecreateUser(jakarta.servlet.http.HttpServletRequest request, UserRestEntity userEntity) javax.ws.rs.core.ResponsedeleteUser(String userName) static Stringjavax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetUserMemberships(String userName, int offset, int limit, boolean returnSize) javax.ws.rs.core.Responsejavax.ws.rs.core.Responsejavax.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:
-
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
-
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(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
-
getUserMemberships
@RolesAllowed("administrators") public javax.ws.rs.core.Response getUserMemberships(String userName, int offset, int limit, boolean returnSize) throws Exception - Throws:
Exception
-
isSuperUser
@RolesAllowed("users") public javax.ws.rs.core.Response isSuperUser() -
isDelegatedAdministrator
@RolesAllowed("users") public javax.ws.rs.core.Response isDelegatedAdministrator() -
isSynchronizedUserAllowedToChangePassword
@RolesAllowed("users") public javax.ws.rs.core.Response isSynchronizedUserAllowedToChangePassword(@Context javax.ws.rs.core.UriInfo uriInfo) throws Exception - Throws:
Exception
-
getCurrentUsername
-