2010-08-04 01:01:18 +02:00
|
|
|
package com.google.gridworks.model;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
2010-08-04 01:01:18 +02:00
|
|
|
import com.google.gridworks.Jsonizable;
|
|
|
|
import com.google.gridworks.history.HistoryEntry;
|
|
|
|
import com.google.gridworks.process.Process;
|
|
|
|
import com.google.gridworks.process.QuickHistoryEntryProcess;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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 {
|
2010-05-13 23:02:19 +02:00
|
|
|
throw new UnsupportedOperationException();
|
2010-05-05 01:24:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected String getBriefDescription(Project project) {
|
2010-05-13 23:02:19 +02:00
|
|
|
throw new UnsupportedOperationException();
|
2010-05-05 01:24:48 +02:00
|
|
|
}
|
|
|
|
}
|