Added "project" argument to OverlayModel methods, as suggested by Fadi Maali.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1439 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
76115a4edd
commit
90d1111ebc
@ -3,9 +3,9 @@ package com.google.refine.model;
|
||||
import com.google.refine.Jsonizable;
|
||||
|
||||
public interface OverlayModel extends Jsonizable {
|
||||
public void onBeforeSave();
|
||||
public void onBeforeSave(Project project);
|
||||
|
||||
public void onAfterSave();
|
||||
public void onAfterSave(Project project);
|
||||
|
||||
public void dispose();
|
||||
public void dispose(Project project);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class Project {
|
||||
public void dispose() {
|
||||
for (OverlayModel overlayModel : overlayModels.values()) {
|
||||
try {
|
||||
overlayModel.dispose();
|
||||
overlayModel.dispose(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Error signaling overlay model before disposing", e);
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class Project {
|
||||
public void saveToOutputStream(OutputStream out, Pool pool) throws IOException {
|
||||
for (OverlayModel overlayModel : overlayModels.values()) {
|
||||
try {
|
||||
overlayModel.onBeforeSave();
|
||||
overlayModel.onBeforeSave(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Error signaling overlay model before saving", e);
|
||||
}
|
||||
@ -114,7 +114,7 @@ public class Project {
|
||||
|
||||
for (OverlayModel overlayModel : overlayModels.values()) {
|
||||
try {
|
||||
overlayModel.onAfterSave();
|
||||
overlayModel.onAfterSave(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Error signaling overlay model after saving", e);
|
||||
}
|
||||
|
@ -24,16 +24,16 @@ public class Protograph implements OverlayModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBeforeSave() {
|
||||
public void onBeforeSave(Project project) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAfterSave() {
|
||||
public void onAfterSave(Project project) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
public void dispose(Project project) {
|
||||
}
|
||||
|
||||
static public Protograph reconstruct(JSONObject o) throws JSONException {
|
||||
|
Loading…
Reference in New Issue
Block a user