2010-02-04 21:51:44 +01:00
|
|
|
package com.metaweb.gridworks.model;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
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-02-19 00:27:40 +01:00
|
|
|
abstract public class AbstractOperation implements Serializable, Jsonizable {
|
2010-02-22 02:28:13 +01:00
|
|
|
private static final long serialVersionUID = 3916055862440019600L;
|
|
|
|
|
|
|
|
public Process createProcess(Project project, Properties options) throws Exception {
|
2010-02-19 00:27:40 +01:00
|
|
|
return new QuickHistoryEntryProcess(project, getBriefDescription()) {
|
|
|
|
@Override
|
|
|
|
protected HistoryEntry createHistoryEntry() throws Exception {
|
|
|
|
return AbstractOperation.this.createHistoryEntry(_project);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected HistoryEntry createHistoryEntry(Project project) throws Exception {
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected String getBriefDescription() {
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
2010-02-04 21:51:44 +01:00
|
|
|
}
|