use of org.akaza.openclinica.service.rule.expression.ExpressionService in project OpenClinica by OpenClinica.
the class RulesPostImportContainerService method getExpressionService.
private ExpressionService getExpressionService() {
expressionService = this.expressionService != null ? expressionService : new ExpressionService(new ExpressionObjectWrapper(ds, currentStudy, (ExpressionBean) null, (RuleSetBean) null));
expressionService.setExpressionWrapper(new ExpressionObjectWrapper(ds, currentStudy, (ExpressionBean) null, (RuleSetBean) null));
return expressionService;
}
use of org.akaza.openclinica.service.rule.expression.ExpressionService in project OpenClinica by OpenClinica.
the class OpenClinicaV1ExpressionProcessor method isRuleAssignmentExpressionValid.
public String isRuleAssignmentExpressionValid() {
try {
oep = new OpenClinicaExpressionParser(expressionWrapper);
oep.parseAndTestEvaluateExpression(e.getValue());
expressionService = new ExpressionService(expressionWrapper);
if (expressionService.ruleSetExpressionChecker(e.getValue())) {
return null;
} else {
MessageFormat mf = new MessageFormat("");
String errorCode = "OCRERR_0024";
mf.applyPattern(respage.getString(errorCode));
Object[] arguments = {};
return errorCode + " : " + mf.format(arguments);
}
} catch (OpenClinicaSystemException e) {
MessageFormat mf = new MessageFormat("");
mf.applyPattern(respage.getString(e.getErrorCode()));
Object[] arguments = e.getErrorParams();
return e.getErrorCode() + " : " + mf.format(arguments);
}
}
use of org.akaza.openclinica.service.rule.expression.ExpressionService in project OpenClinica by OpenClinica.
the class TestRuleServlet method getExpressionService.
private ExpressionService getExpressionService() {
expressionService = this.expressionService != null ? expressionService : new ExpressionService(new ExpressionObjectWrapper(sm.getDataSource(), currentStudy, (ExpressionBean) null, (RuleSetBean) null));
expressionService.setExpressionWrapper(new ExpressionObjectWrapper(sm.getDataSource(), currentStudy, (ExpressionBean) null, (RuleSetBean) null));
return expressionService;
}
Aggregations