01: // ResourceEditorInterface.java
02: // $Id: ResourceEditorInterface.java,v 1.7 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.jigsaw.admin.RemoteAccessException;
11: import org.w3c.jigsaw.admin.RemoteResource;
12:
13: import org.w3c.jigadm.RemoteResourceWrapper;
14:
15: import org.w3c.jigadm.events.ResourceListener;
16:
17: import org.w3c.tools.resources.Attribute;
18:
19: public interface ResourceEditorInterface {
20:
21: /**
22: * Tells if the edited value has changed
23: * @return true if the value changed.
24: */
25:
26: public boolean hasChanged();
27:
28: /**
29: * set the current value to be the original value, ie: changed
30: * must return <strong>false</strong> after a reset.
31: */
32:
33: public void clearChanged();
34:
35: /**
36: * commit the changes (if any)
37: * @exception RemoteAccessException if a remote access error occurs.
38: */
39:
40: public void commitChanges() throws RemoteAccessException;
41:
42: /**
43: * Get the current value of the edited value
44: * @return a RemoteResource or <strong>null</strong> if the object was not
45: * initialized
46: */
47:
48: public RemoteResource getValue();
49:
50: /**
51: * Add a Listener to this helper.
52: * @param el a listener
53: */
54:
55: public void addResourceListener(ResourceListener el);
56:
57: /**
58: * Remove the listener from this helper.
59: * @param el the listener to be removed.
60: */
61:
62: public void removeResourceListener(ResourceListener el);
63:
64: /**
65: * initialize the helper
66: * @param rw the ResourceWrapper of the Resource edited with this helper
67: * @param p some Properties, used to fine-tune the helper
68: * @exception RemoteAccessException if a remote access error occurs.
69: */
70:
71: public void initialize(RemoteResourceWrapper rw, Properties p)
72: throws RemoteAccessException;
73: }
|