use of com.evolveum.midpoint.prism.crypto.ProtectorImpl in project midpoint by Evolveum.
the class TestScriptCaching method setupFactory.
@BeforeClass
public void setupFactory() {
System.out.println("Setting up expression factory and evaluator");
PrismContext prismContext = PrismTestUtil.getPrismContext();
ObjectResolver resolver = new DirectoryFileObjectResolver(OBJECTS_DIR);
Protector protector = new ProtectorImpl();
Collection<FunctionLibrary> functions = new ArrayList<FunctionLibrary>();
functions.add(FunctionLibraryUtil.createBasicFunctionLibrary(prismContext, protector));
scriptExpressionfactory = new ScriptExpressionFactory(resolver, prismContext, protector);
scriptExpressionfactory.setFunctions(functions);
evaluator = new Jsr223ScriptEvaluator("groovy", prismContext, protector);
String languageUrl = evaluator.getLanguageUrl();
scriptExpressionfactory.registerEvaluator(languageUrl, evaluator);
}
use of com.evolveum.midpoint.prism.crypto.ProtectorImpl in project midpoint by Evolveum.
the class TestExpression method setup.
@BeforeSuite
public void setup() throws SchemaException, SAXException, IOException {
PrettyPrinter.setDefaultNamespacePrefix(MidPointConstants.NS_MIDPOINT_PUBLIC_PREFIX);
PrismTestUtil.resetPrismContext(MidPointPrismContextFactory.FACTORY);
prismContext = PrismTestUtil.createInitializedPrismContext();
ObjectResolver resolver = new DirectoryFileObjectResolver(MidPointTestConstants.OBJECTS_DIR);
ProtectorImpl protector = ExpressionTestUtil.createInitializedProtector(prismContext);
expressionFactory = ExpressionTestUtil.createInitializedExpressionFactory(resolver, protector, prismContext, null);
}
use of com.evolveum.midpoint.prism.crypto.ProtectorImpl in project midpoint by Evolveum.
the class TestExpressionFunctions method createBasicFunctions.
private BasicExpressionFunctions createBasicFunctions() throws SchemaException, SAXException, IOException {
PrismContext prismContext = PrismTestUtil.createInitializedPrismContext();
Protector protector = new ProtectorImpl();
return new BasicExpressionFunctions(prismContext, protector);
}
Aggregations