Moved call to FileHistoryEntryManager from ProjectManager to FileProjectManager.

Added interface HistoryEntryManager, which seems to have been forgotten from last commit.
FileHistoryEntry is now named FileHistoryEntryManager.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@983 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Iain Sproat 2010-06-16 14:17:17 +00:00
parent f92fc2d056
commit 18e319bb76
4 changed files with 20 additions and 11 deletions

View File

@ -41,8 +41,6 @@ public abstract class ProjectManager {
*/
transient protected Map<Long, Project> _projects;
protected HistoryEntryManager _historyEntryManager;
static public ProjectManager singleton;
public InterProjectModel getInterProjectModel() {
@ -125,9 +123,5 @@ public abstract class ProjectManager {
public abstract void deleteProject(long projectID) ;
//public abstract HistoryEntry createHistoryEntry(long id, long projectID, String description, AbstractOperation operation, Date time);
//public abstract HistoryEntry createHistoryEntry(long id, Project project, String description, AbstractOperation operation, Change change);
public HistoryEntryManager getHistoryEntryManager(){
return this._historyEntryManager;
}
public abstract HistoryEntryManager getHistoryEntryManager();
}

View File

@ -0,0 +1,12 @@
package com.metaweb.gridworks.history;
import java.io.Writer;
import java.util.Properties;
public interface HistoryEntryManager {
public void loadChange(HistoryEntry historyEntry);
public void saveChange(HistoryEntry historyEntry) throws Exception;
public void save(HistoryEntry historyEntry, Writer writer, Properties options);
public void delete(HistoryEntry historyEntry);
}

View File

@ -19,7 +19,7 @@ import com.metaweb.gridworks.history.HistoryEntryManager;
import com.metaweb.gridworks.util.Pool;
public class FileHistoryEntry implements HistoryEntryManager{
public class FileHistoryEntryManager implements HistoryEntryManager{
public void delete(HistoryEntry historyEntry) {
File file = getChangeFile(historyEntry);

View File

@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
import com.metaweb.gridworks.ProjectManager;
import com.metaweb.gridworks.ProjectMetadata;
import com.metaweb.gridworks.history.HistoryEntryManager;
import com.metaweb.gridworks.model.Project;
import com.metaweb.gridworks.util.JSONUtilities;
@ -55,8 +56,6 @@ public class FileProjectManager extends ProjectManager{
_expressions = new LinkedList<String>();
_projects = new HashMap<Long, Project>();
_historyEntryManager = new FileHistoryEntry();
load();
}
@ -445,4 +444,8 @@ public class FileProjectManager extends ProjectManager{
return found;
}
public HistoryEntryManager getHistoryEntryManager(){
return new FileHistoryEntryManager();
}
}