Search in sources :

Example 1 with ImportController

use of com.evolveum.midpoint.report.impl.controller.ImportController in project midpoint by Evolveum.

the class ClassicReportImportActivityRun method beforeRun.

@Override
public void beforeRun(OperationResult result) throws CommonException, ActivityRunException {
    support.beforeExecution(result);
    ReportType report = support.getReport();
    support.stateCheck(result);
    controller = new ImportController(report, reportService, support.existCollectionConfiguration() ? support.getCompiledCollectionView(result) : null);
    controller.initialize();
    try {
        variables = controller.parseColumnsAsVariablesFromFile(support.getReportData());
    } catch (IOException e) {
        String message = "Couldn't read content of imported file: " + e.getMessage();
        result.recordFatalError(message, e);
        throw new ActivityRunException(message, FATAL_ERROR, PERMANENT_ERROR, e);
    }
}
Also used : ActivityRunException(com.evolveum.midpoint.repo.common.activity.run.ActivityRunException) ImportController(com.evolveum.midpoint.report.impl.controller.ImportController) IOException(java.io.IOException)

Aggregations

ActivityRunException (com.evolveum.midpoint.repo.common.activity.run.ActivityRunException)1 ImportController (com.evolveum.midpoint.report.impl.controller.ImportController)1 IOException (java.io.IOException)1