Class ImportAction
java.lang.Object
com.evolveum.midpoint.ninja.action.mining.generator.context.ImportAction
Class responsible for importing initial objects into the Midpoint system.
Part of RBAC Testing Data, which provides testing data for role mining and other RBAC-related processes.
-
Constructor Summary
ConstructorDescriptionImportAction
(@NotNull NinjaContext context, @NotNull GeneratorOptions generatorOptions, @NotNull OperationResult result) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
generateAndImportUsers
(int userCount) getNameFromSet
(PolyStringType initialName) Gets a name from the set of extracted names from csv and removes it from the set due to objects name collision.static void
remakeUsersBusinessRoles
(@NotNull NinjaContext context, @NotNull OperationResult result, @NotNull GeneratorOptions generatorOptions, @Nullable ObjectQuery query, @Nullable Collection<SelectorOptions<GetOperationOptions>> options) Remakes business roles for their inducements on users.
-
Constructor Details
-
ImportAction
public ImportAction(@NotNull @NotNull NinjaContext context, @NotNull @NotNull GeneratorOptions generatorOptions, @NotNull @NotNull OperationResult result)
-
-
Method Details
-
executeImport
public void executeImport() -
generateAndImportUsers
public void generateAndImportUsers(int userCount) -
remakeUsersBusinessRoles
public static void remakeUsersBusinessRoles(@NotNull @NotNull NinjaContext context, @NotNull @NotNull OperationResult result, @NotNull @NotNull GeneratorOptions generatorOptions, @Nullable @Nullable ObjectQuery query, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options) Remakes business roles for their inducements on users.This method replaces business roles with their inducements.
- Parameters:
context
- The Ninja context.result
- The operation result used for tracking the operation.query
- The query for searching users.options
- The options for retrieving users.- Throws:
RuntimeException
- If an error occurs during the process.
-
getNameFromSet
Gets a name from the set of extracted names from csv and removes it from the set due to objects name collision.- Parameters:
initialName
- The initial name to use if the set is empty.- Returns:
- A PolyStringType representing the name.
-