Class TestKitUserResource
java.lang.Object
com.atlassian.crowd.plugins.testkit.rest.TestKitUserResource
@Named
@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 TypeMethodDescriptionjavax.ws.rs.core.ResponsecreateUser(String username, Long directoryId, String email, boolean active, boolean hasExpiredPassword, String firstName, String lastName) javax.ws.rs.core.ResponsegetExternalIds(List<String> usernames, long directoryId) javax.ws.rs.core.ResponsegetResetToken(String username, long directoryId) javax.ws.rs.core.ResponseremoveUser(String username, long directoryId) <T> List<T>searchUsersPaged(Application app, EntityQuery<T> query, int pageSize, boolean pager) searchUsersPaged(Application app, String searchText) javax.ws.rs.core.ResponsesearchUsersPagedPerformance(long appId, String searchText) javax.ws.rs.core.ResponseupdateUser(String username, Long directoryId, String email, Boolean active, boolean hasExpiredPassword, String firstName, String lastName) javax.ws.rs.core.ResponseupdateUserLocally(String username, long directoryId, Map<String, String> updates) javax.ws.rs.core.ResponseupdateUserPasswordToExpired(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 javax.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 javax.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 javax.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 javax.ws.rs.core.Response getExternalIds(@QueryParam("names") List<String> usernames, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
getResetToken
@GET @Path("/reset-token") public javax.ws.rs.core.Response getResetToken(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
removeUser
@DELETE @Path("/remove") public javax.ws.rs.core.Response removeUser(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws Exception - Throws:
Exception
-
updateUserPasswordToExpired
@PUT @Path("/expire-password") public javax.ws.rs.core.Response updateUserPasswordToExpired(@QueryParam("name") String username, @QueryParam("directoryId") long directoryId) throws UserNotFoundException, DirectoryNotFoundException -
searchUsersPagedPerformance
@GET @Path("/search-paged-performance") public javax.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
-