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