365868564f
git-svn-id: http://google-refine.googlecode.com/svn/branches/split-refactor@905 7d457c2a-affb-35e4-300a-418c747d4874
32 lines
1.1 KiB
Java
32 lines
1.1 KiB
Java
package com.metaweb.gridworks.model;
|
|
|
|
import java.util.Properties;
|
|
|
|
import com.metaweb.gridworks.Jsonizable;
|
|
import com.metaweb.gridworks.history.HistoryEntry;
|
|
import com.metaweb.gridworks.process.Process;
|
|
import com.metaweb.gridworks.process.QuickHistoryEntryProcess;
|
|
|
|
/*
|
|
* An abstract operation can be applied to different but similar
|
|
* projects.
|
|
*/
|
|
abstract public class AbstractOperation implements Jsonizable {
|
|
public Process createProcess(Project project, Properties options) throws Exception {
|
|
return new QuickHistoryEntryProcess(project, getBriefDescription(null)) {
|
|
@Override
|
|
protected HistoryEntry createHistoryEntry(long historyEntryID) throws Exception {
|
|
return AbstractOperation.this.createHistoryEntry(_project, historyEntryID);
|
|
}
|
|
};
|
|
}
|
|
|
|
protected HistoryEntry createHistoryEntry(Project project, long historyEntryID) throws Exception {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
protected String getBriefDescription(Project project) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
}
|