Search in sources :

Example 1 with ExpressionProfileCompiler

use of com.evolveum.midpoint.model.common.expression.ExpressionProfileCompiler in project midpoint by Evolveum.

the class SystemObjectCache method compileExpressionProfiles.

private void compileExpressionProfiles(OperationResult result) throws SchemaException {
    PrismObject<SystemConfigurationType> systemConfiguration = getSystemConfiguration(result);
    if (systemConfiguration == null) {
        // This should only happen in tests - if ever. Empty expression profiles are just fine.
        expressionProfiles = new ExpressionProfiles();
        return;
    }
    SystemConfigurationExpressionsType expressions = systemConfiguration.asObjectable().getExpressions();
    if (expressions == null) {
        // Mark that there is no need to recompile. There are no profiles.
        expressionProfiles = new ExpressionProfiles();
        return;
    }
    ExpressionProfileCompiler compiler = new ExpressionProfileCompiler();
    expressionProfiles = compiler.compile(expressions);
}
Also used : ExpressionProfileCompiler(com.evolveum.midpoint.model.common.expression.ExpressionProfileCompiler) ExpressionProfiles(com.evolveum.midpoint.schema.expression.ExpressionProfiles)

Aggregations

ExpressionProfileCompiler (com.evolveum.midpoint.model.common.expression.ExpressionProfileCompiler)1 ExpressionProfiles (com.evolveum.midpoint.schema.expression.ExpressionProfiles)1