1
2
3
4
5
6 package net.kwfgrid.gworkflowdl.protocol.structure;
7
8 import java.util.EventListener;
9 import java.util.List;
10
11 /***
12 The interface for a structure listener.
13 */
14 public interface IStructureListener extends EventListener {
15 /***
16 Called when an object has been added to the object structure.
17 The structure MUST NOT be altered further during structure event dispatching.
18 To do this add an instance of <code>IStructureTask</code> to the root object's task queue
19 (accessible through <code>parent.getRoot().getTaskQueue()</code> and use extended implementations
20 of method call strategies <code>DefaultClientDelegateExt, DefaultServerDelegateExt or DefaultMethodCallStrategyExt</code>.
21 @param parent The parent of the added objects.
22 @param namespace The namespace of the added objects.
23 @param name The name of the added objects.
24 @param added The added object.
25 */
26 void objectsAdded(IStructureObject parent, String namespace, String name, List objects);
27 /***
28 Called when an object has been removed from the object structure.
29 The structure MUST NOT be altered further during structure event dispatching.
30 To do this add an instance of <code>IStructureTask</code> to the root object's task queue
31 (accessible through <code>parent.getRoot().getTaskQueue()</code> and use extended implementations
32 of method call strategies <code>DefaultClientDelegateExt, DefaultServerDelegateExt or DefaultMethodCallStrategyExt</code>.
33 @param oldparent The former parent of the removed object.
34 @param namespace The namespace of the removed objects.
35 @param name The name of the removed objects.
36 @param objects The removed objects.
37 */
38 void objectsRemoved(IStructureObject oldparent, String namespace, String name, List objects);
39 /***
40 Called when a property in the object structure has changed it's value.
41 The structure MUST NOT be altered further during structure event dispatching.
42 To do this add an instance of <code>IStructureTask</code> to the root object's task queue
43 (accessible through <code>parent.getRoot().getTaskQueue()</code> and use extended implementations
44 of method call strategies <code>DefaultClientDelegateExt, DefaultServerDelegateExt or DefaultMethodCallStrategyExt</code>.
45 @param parent The parent of the leaf.
46 @param namespace The namespace of the updated property.
47 @param name The name of the updated property.
48 @param newvalue The new value of the updated property. Primitives like int, boolean, etc. will be wrapped in according Objects.
49 */
50 void propertyChanged(IStructureObject parent, String namespace, String name, Object newvalue);
51 }