use of com.evolveum.midpoint.xml.ns._public.common.common_3.OrphanedPolicyConstraintType in project midpoint by Evolveum.
the class OrphanedConstraintEvaluator method createBuiltInMessage.
@NotNull
private <AH extends AssignmentHolderType> LocalizableMessage createBuiltInMessage(String keyPrefix, JAXBElement<OrphanedPolicyConstraintType> constraintElement, PolicyRuleEvaluationContext<AH> ctx, OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException {
OrphanedPolicyConstraintType constraint = constraintElement.getValue();
List<Object> args = new ArrayList<>();
args.add(evaluatorHelper.createBeforeAfterMessage(ctx));
String keySuffix;
if (constraint.getName() != null) {
args.add(constraint.getName());
keySuffix = KEY_NAMED;
} else {
keySuffix = KEY_UNNAMED;
}
LocalizableMessage builtInMessage = new LocalizableMessageBuilder().key(keyPrefix + keySuffix).args(args).build();
return evaluatorHelper.createLocalizableMessage(constraintElement, ctx, builtInMessage, result);
}
Aggregations