01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.core;
16:
17: import org.eclipse.ui.IMemento;
18:
19: /**
20: * Provides a resolution method for fixing a memento item.
21: *
22: * @author chorner
23: * @since 1.1.0
24: */
25: public interface IFixer {
26:
27: /**
28: * Determines if the object memento can be handled by this fixer implementation.
29: *
30: * @param object victim
31: * @param memento additional tidbits for fixer initialization and saving state.
32: * @return
33: */
34: public boolean canFix(Object object, IMemento memento);
35:
36: /**
37: * Performs the fix operation. This could be a zoom to a feature, or simply firing up a cheat
38: * sheet/dialog.
39: *
40: * @param object victim
41: * @param memento additional tidbits for fixer initialization and saving state.
42: */
43: public void fix(Object object, IMemento memento);
44:
45: /**
46: * Informs the fixer that the fix was completed successfully.
47: *
48: * @param object victim
49: */
50: public void complete(Object object);
51:
52: }
|