use of com.evolveum.midpoint.xml.ns._public.common.api_types_3.PolicyItemTargetType in project midpoint by Evolveum.
the class GenerateValueExecutor method execute.
@Override
public PipelineData execute(ActionExpressionType action, PipelineData input, ExecutionContext context, OperationResult globalResult) throws ScriptExecutionException, SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException {
PolicyItemsDefinitionType itemsDefinition;
PolicyItemsDefinitionType configured = expressionHelper.getActionArgument(PolicyItemsDefinitionType.class, action, GenerateValueActionExpressionType.F_ITEMS, PARAMETER_ITEMS, input, context, null, PARAMETER_ITEMS, globalResult);
if (configured != null) {
itemsDefinition = configured;
} else {
itemsDefinition = new PolicyItemsDefinitionType().policyItemDefinition(new PolicyItemDefinitionType().target(new PolicyItemTargetType().path(new ItemPathType(PATH_CREDENTIALS_PASSWORD_VALUE))).execute(false));
}
iterateOverObjects(input, context, globalResult, (object, item, result) -> {
modelInteraction.generateValue(object, itemsDefinition, context.getTask(), result);
context.println("Generated value(s) for " + object);
}, (object, exception) -> {
context.println("Failed to generate value(s) for " + object + exceptionSuffix(exception));
});
return input;
}
Aggregations