01: // ResourceHelperInterface.java
02: // $Id: ResourceHelperInterface.java,v 1.9 2000/08/16 21:37:27 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.jigadm.editors;
07:
08: import java.util.Properties;
09:
10: import org.w3c.jigadm.RemoteResourceWrapper;
11:
12: import org.w3c.jigadm.events.ResourceListener;
13:
14: import org.w3c.jigsaw.admin.RemoteAccessException;
15: import org.w3c.jigsaw.admin.RemoteResource;
16:
17: import org.w3c.tools.resources.Attribute;
18:
19: public interface ResourceHelperInterface {
20:
21: /**
22: * tells if the edited resource in the helper has changed
23: * @return <strong>true</strong> if the values changed.
24: * to get more informations about what has changed, you can use the
25: * three methods below.
26: */
27:
28: public boolean hasChanged();
29:
30: /**
31: * set the current resource to be the original resource (ie: the
32: * hasChanged() method must return <strong>false</false> now.
33: * to do a "fine tuned" reset, use one of the three following method.
34: */
35:
36: public void clearChanged();
37:
38: /**
39: * get the Resource edited with this helper
40: * @return a RemoteResource
41: */
42:
43: public RemoteResource getValue();
44:
45: /**
46: * Add a Listener to this helper.
47: * @param el a listener
48: */
49:
50: public void addResourceListener(ResourceListener el);
51:
52: /**
53: * Remove the listener from this helper.
54: * @param el the listener to be removed.
55: */
56:
57: public void removeResourceListener(ResourceListener el);
58:
59: /**
60: * commit the changes (if any)
61: * @exception RemoteAccessException if a remote access error occurs.
62: */
63:
64: public void commitChanges() throws RemoteAccessException;
65:
66: /**
67: * undo the not-yet-commited changes
68: */
69:
70: public void resetChanges();
71:
72: /**
73: * initialize the helper
74: * @param r the ResourceWrapper containing the Resource edited with
75: * this helper
76: * @param p some Properties, used to fine-tune the helper
77: * @exception RemoteAccessException if a remote access error occurs.
78: */
79:
80: public void initialize(RemoteResourceWrapper rw, Properties p)
81: throws RemoteAccessException;
82:
83: }
|