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 TypeMethodDescriptionstatic <V> void
addExtensionValue
(Containerable extContainer, String itemName, V... values) void
void
generateAndImportUsers
(int userCount) static PolyStringType
getNameFromSet
(PolyStringType initialName, Set<String> names) Gets a name from the set of extracted names from csv and removes it from the set due to objects name collision.static void
importUserAndResolveAuxRoles
(@NotNull UserType user, @NotNull com.evolveum.midpoint.repo.api.RepositoryService repositoryService, @NotNull GeneratorOptions generatorOptions, @NotNull OperationResult result, @NotNull Log log) 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() -
importUserAndResolveAuxRoles
public static void importUserAndResolveAuxRoles(@NotNull @NotNull UserType user, @NotNull @NotNull com.evolveum.midpoint.repo.api.RepositoryService repositoryService, @NotNull @NotNull GeneratorOptions generatorOptions, @NotNull @NotNull OperationResult result, @NotNull @NotNull Log log) -
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.names
- The set of extracted names from csv.- Returns:
- A PolyStringType representing the name.
-
addExtensionValue
-