Search in sources :

Example 1 with SystemLoadListenerImpl

use of com.enonic.xp.impl.server.rest.task.listener.SystemLoadListenerImpl in project xp by enonic.

the class LoadRunnableTask method run.

@Override
public void run(final TaskId id, final ProgressReporter progressReporter) {
    SystemLoadResultJson result;
    loadDumpListener = new SystemLoadListenerImpl(progressReporter);
    final Path dumpRoot = getDumpRoot(params.getName());
    if (isExport(dumpRoot)) {
        result = doLoadFromExport(dumpRoot);
    } else {
        result = doLoadFromSystemDump(params);
    }
    progressReporter.info(result.toString());
}
Also used : Path(java.nio.file.Path) NodePath(com.enonic.xp.node.NodePath) SystemLoadListenerImpl(com.enonic.xp.impl.server.rest.task.listener.SystemLoadListenerImpl) SystemLoadResultJson(com.enonic.xp.impl.server.rest.model.SystemLoadResultJson)

Aggregations

SystemLoadResultJson (com.enonic.xp.impl.server.rest.model.SystemLoadResultJson)1 SystemLoadListenerImpl (com.enonic.xp.impl.server.rest.task.listener.SystemLoadListenerImpl)1 NodePath (com.enonic.xp.node.NodePath)1 Path (java.nio.file.Path)1