Class TestKitUserResource
java.lang.Object
com.atlassian.crowd.plugins.testkit.rest.TestKitUserResource
@Component
@Path("/user")
@Produces("application/json")
@Consumes("application/json")
public class TestKitUserResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionTestKitUserResource
(DirectoryManager directoryManager, ForgottenLoginManager forgottenLoginManager, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, ApplicationService applicationService, ApplicationManager applicationManager) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
createUser
(String username, Long directoryId, String email, boolean active, boolean hasExpiredPassword, String firstName, String lastName) jakarta.ws.rs.core.Response
getExternalIds
(List<String> usernames, long directoryId) jakarta.ws.rs.core.Response
getResetToken
(String username, long directoryId) jakarta.ws.rs.core.Response
removeUser
(String username, long directoryId) <T> List
<T> searchUsersPaged
(Application app, EntityQuery<T> query, int pageSize, boolean pager) searchUsersPaged
(Application app, String searchText) jakarta.ws.rs.core.Response
searchUsersPagedPerformance
(long appId, String searchText) jakarta.ws.rs.core.Response
updateUser
(String username, Long directoryId, String email, Boolean active, boolean hasExpiredPassword, String firstName, String lastName) jakarta.ws.rs.core.Response
updateUserLocally
(String username, long directoryId, Map<String, String> updates) jakarta.ws.rs.core.Response
updateUserPasswordToExpired
(String username, long directoryId)
-
Constructor Details
-
TestKitUserResource
@Inject public TestKitUserResource(DirectoryManager directoryManager, ForgottenLoginManager forgottenLoginManager, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, ApplicationService applicationService, ApplicationManager applicationManager)
-
-
Method Details
-
createUser
@POST public jakarta.ws.rs.core.Response createUser(@QueryParam("name") String username, @QueryParam("directoryId") Long directoryId, @QueryParam("email") @Nullable String email, @QueryParam("active") @DefaultValue("true") boolean active, @QueryParam("hasExpiredPassword") @DefaultValue("false") boolean hasExpiredPassword, @QueryParam("firstName") @Nullable String firstName, @QueryParam("lastName") @Nullable String lastName) throws Exception - Throws:
Exception
-
updateUser
@PUT public jakarta.ws.rs.core.Response updateUser(@QueryParam("name") String username, @QueryParam("directoryId") Long directoryId, @QueryParam("email") @Nullable String email, @QueryParam("active") @Nullable Boolean active, @QueryParam("hasExpiredPassword") @DefaultValue("false") boolean hasExpiredPassword, @QueryParam("firstName") @Nullable String firstName, @QueryParam("lastName") @Nullable String lastName) throws Exception - Throws:
Exception
-
updateUserLocally
@PUT @Path("/update-locally") public jakarta.ws.rs.core.Response updateUserLocally(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId, Map<String, String> updates) throws Exception- Throws:
Exception
-
getExternalIds
@GET @Path("/external-ids") public jakarta.ws.rs.core.Response getExternalIds(@QueryParam("names") List<String> usernames, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
getResetToken
@GET @Path("/reset-token") public jakarta.ws.rs.core.Response getResetToken(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
removeUser
@DELETE @Path("/remove") public jakarta.ws.rs.core.Response removeUser(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
updateUserPasswordToExpired
@PUT @Path("/expire-password") public jakarta.ws.rs.core.Response updateUserPasswordToExpired(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws UserNotFoundException, DirectoryNotFoundException -
searchUsersPagedPerformance
@GET @Path("/search-paged-performance") public jakarta.ws.rs.core.Response searchUsersPagedPerformance(@QueryParam("appId") long appId, @QueryParam("search") String searchText) throws Exception - Throws:
Exception
-
searchUsersPaged
public Map<String,String> searchUsersPaged(Application app, String searchText) throws PagingNotSupportedException - Throws:
PagingNotSupportedException
-
searchUsersPaged
public <T> List<T> searchUsersPaged(Application app, EntityQuery<T> query, int pageSize, boolean pager) throws PagingNotSupportedException - Throws:
PagingNotSupportedException
-