Class TestkitFixtureResource
java.lang.Object
com.atlassian.crowd.plugins.testkit.rest.TestkitFixtureResource
@Named
@Path("/fixture")
@Produces("application/json")
@Consumes("application/json")
public class TestkitFixtureResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionTestkitFixtureResource(DirectoryManager directoryManager, ApplicationManager applicationManager, ApplicationFactory crowdApplicationFactory, GroupAdministrationConfigurationService groupAdministrationConfigurationService, TombstoneManager tombstoneManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecreateSampleDirectory(int userCount, int groupCount, int usersPerGroup, int nestedGroupCount, boolean createGroupManagingAllGroups, String namePrefix) javax.ws.rs.core.ResponseloginUsers(String cachedName, String delegatedName, boolean includeExisting) The purpose of this method is to fill in cache of the delegated directory by logging in all users from cached directory, that should be pointed at the same target directory.voidjavax.ws.rs.core.ResponseupdateDirectory(String directoryName, String addNamePrefix, int addUserCount, int renameUserCount, int reAddUserCount, int updateUserCount, int userMembershipModifications, int groupMembershipModifications) Modifies directory entities.
-
Constructor Details
-
TestkitFixtureResource
@Inject public TestkitFixtureResource(DirectoryManager directoryManager, ApplicationManager applicationManager, ApplicationFactory crowdApplicationFactory, GroupAdministrationConfigurationService groupAdministrationConfigurationService, TombstoneManager tombstoneManager)
-
-
Method Details
-
createSampleDirectory
@Path("/directory/internal") @POST public javax.ws.rs.core.Response createSampleDirectory(@QueryParam("users") @DefaultValue("10000") int userCount, @QueryParam("groups") @DefaultValue("1000") int groupCount, @QueryParam("usersPerGroup") @DefaultValue("25") int usersPerGroup, @QueryParam("nestedGroupCount") @DefaultValue("10") int nestedGroupCount, @QueryParam("createGroupManagingAllGroups") @DefaultValue("false") boolean createGroupManagingAllGroups, @QueryParam("namePrefix") @DefaultValue("") String namePrefix) throws Exception - Throws:
Exception
-
updateDirectory
@Path("/directory/internal/update") @POST public javax.ws.rs.core.Response updateDirectory(@QueryParam("directoryName") String directoryName, @QueryParam("addNamePrefix") @DefaultValue("") String addNamePrefix, @QueryParam("addUserCount") int addUserCount, @QueryParam("renameUserCount") int renameUserCount, @QueryParam("reAddUserCount") int reAddUserCount, @QueryParam("updateUserCount") int updateUserCount, @QueryParam("userMembershipModifications") int userMembershipModifications, @QueryParam("groupMembershipModifications") int groupMembershipModifications) throws Exception Modifies directory entities.- Parameters:
directoryName- name of the directory to modifyaddNamePrefix- prefix of names of users to addaddUserCount- number of users to addrenameUserCount- number of users to renamereAddUserCount- number of users to remove and re-add with different nameupdateUserCount- number of users to updateuserMembershipModifications- number of user memberships to remove and addgroupMembershipModifications- number of group memberships to remove and add- Throws:
Exception
-
loginUsers
@Path("/directory/delegated/loginusers") public javax.ws.rs.core.Response loginUsers(@QueryParam("cachedName") String cachedName, @QueryParam("delegatedName") String delegatedName, @QueryParam("includeExisting") boolean includeExisting) throws Exception The purpose of this method is to fill in cache of the delegated directory by logging in all users from cached directory, that should be pointed at the same target directory.- Parameters:
cachedName- name of the directory to fetch the user names fromdelegatedName- name of the delegated directoryincludeExisting- whether users already existing in the delegated directory should be logged in- Throws:
Exception
-
removeTombstones
@Path("/tombstone") @DELETE public void removeTombstones()
-