1 package org.simantics.export.core.manager;
5 import org.eclipse.core.runtime.IProgressMonitor;
6 import org.simantics.databoard.binding.mutable.Variant;
7 import org.simantics.export.core.ExportContext;
8 import org.simantics.export.core.error.ExportException;
11 * A single article of export action in an export plan.
13 * @author toni.kalajainen@semantum.fi
15 public abstract class ExportAction {
18 * Execute export action.
23 * @throws ExportException
25 public abstract void execute(ExportContext ctx, IProgressMonitor progress, Variant options)
26 throws ExportException;
29 * Get the label for this action to be used in user interface.
32 * @return the label for this action.
34 public abstract String label(ExportContext ctx);
37 * Get the amount of work in this action (used in progress bar).
40 * @return the amount of work
42 public abstract int work(ExportContext ctx);
45 * Validate action is executable
49 * @return null or a label describing the expected problem
51 public abstract List<String> validate(ExportContext ctx, Variant options);
54 * Cancel and cleanup the output of this action. Deletes temporary files.
59 * @throws ExportException
61 public abstract void cleanup(ExportContext ctx, IProgressMonitor progress, Variant options) throws ExportException;