2010-02-04 21:51:44 +01:00
|
|
|
package com.metaweb.gridworks.model;
|
|
|
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
2010-02-19 00:27:40 +01:00
|
|
|
import org.apache.commons.lang.NotImplementedException;
|
|
|
|
|
2010-02-04 21:51:44 +01:00
|
|
|
import com.metaweb.gridworks.Jsonizable;
|
2010-02-19 00:27:40 +01:00
|
|
|
import com.metaweb.gridworks.history.HistoryEntry;
|
2010-02-04 21:51:44 +01:00
|
|
|
import com.metaweb.gridworks.process.Process;
|
2010-02-19 00:27:40 +01:00
|
|
|
import com.metaweb.gridworks.process.QuickHistoryEntryProcess;
|
2010-02-04 21:51:44 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* An abstract operation can be applied to different but similar
|
|
|
|
* projects.
|
|
|
|
*/
|
2010-03-07 23:37:26 +01:00
|
|
|
abstract public class AbstractOperation implements Jsonizable {
|
2010-02-22 02:28:13 +01:00
|
|
|
public Process createProcess(Project project, Properties options) throws Exception {
|
2010-03-03 05:19:58 +01:00
|
|
|
return new QuickHistoryEntryProcess(project, getBriefDescription(null)) {
|
|
|
|
@Override
|
2010-04-28 19:18:44 +02:00
|
|
|
protected HistoryEntry createHistoryEntry(long historyEntryID) throws Exception {
|
|
|
|
return AbstractOperation.this.createHistoryEntry(_project, historyEntryID);
|
2010-03-03 05:19:58 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2010-04-28 19:18:44 +02:00
|
|
|
protected HistoryEntry createHistoryEntry(Project project, long historyEntryID) throws Exception {
|
2010-03-03 05:19:58 +01:00
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected String getBriefDescription(Project project) {
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
2010-02-04 21:51:44 +01:00
|
|
|
}
|