Search in sources :

Example 1 with UpgradeListenerImpl

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

the class UpgradeRunnableTask method run.

@Override
public void run(final TaskId id, final ProgressReporter progressReporter) {
    final UpgradeListener upgradeListener = new UpgradeListenerImpl(progressReporter);
    final SystemDumpUpgradeParams upgradeParams = SystemDumpUpgradeParams.create().dumpName(params.getName()).upgradeListener(upgradeListener).build();
    final DumpUpgradeResult result = this.dumpService.upgrade(upgradeParams);
    upgradeListener.finished();
    progressReporter.info(SystemDumpUpgradeResultJson.from(result).toString());
}
Also used : UpgradeListener(com.enonic.xp.upgrade.UpgradeListener) UpgradeListenerImpl(com.enonic.xp.impl.server.rest.task.listener.UpgradeListenerImpl) SystemDumpUpgradeParams(com.enonic.xp.dump.SystemDumpUpgradeParams) DumpUpgradeResult(com.enonic.xp.dump.DumpUpgradeResult)

Aggregations

DumpUpgradeResult (com.enonic.xp.dump.DumpUpgradeResult)1 SystemDumpUpgradeParams (com.enonic.xp.dump.SystemDumpUpgradeParams)1 UpgradeListenerImpl (com.enonic.xp.impl.server.rest.task.listener.UpgradeListenerImpl)1 UpgradeListener (com.enonic.xp.upgrade.UpgradeListener)1