]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc/src/main/java/org/argeo/slc/core/structure/StructureRegistry.java
Improve documentation.
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / structure / StructureRegistry.java
1 package org.argeo.slc.core.structure;
2
3 import java.util.List;
4
5 /** Registry where the whole structure is stored. */
6 public interface StructureRegistry {
7 /** Read mode: the structure is only read. */
8 public static String READ = "READ";
9 /** All mode: everything is executed regardless of the active paths. */
10 public static String ALL = "ALL";
11 /** Active mode: only teh active paths are executed. */
12 public static String ACTIVE = "ACTIVE";
13
14 /** Adds an element to the registry. */
15 public void register(StructureElement element);
16
17 /**
18 * Adds the wrapped element of a <code>SructureAware</code>, and
19 * propagates the registration.
20 */
21 public void register(StructureAware structureAware);
22
23 /** Lists <b>all</b> registered elements. */
24 public List<StructureElement> listElements();
25
26 /** Gets a element based on its path. */
27 public StructureElement getElement(StructurePath path);
28
29 /**
30 * Set the interpreter mode: read, all or active.
31 *
32 * @see #READ
33 * @see #ALL
34 * @see #ACTIVE
35 */
36 public void setMode(String mode);
37
38 /**
39 * Gets the current interpreter mode.
40 *
41 * @see #READ
42 * @see #ALL
43 * @see #ACTIVE
44 */
45 public String getMode();
46
47 /**
48 * Gets the list of active paths, which will be run if executed in
49 * <code>ACTIVE</code> mode.
50 */
51 public List<StructurePath> getActivePaths();
52
53 /**
54 * Sets the list of active path, which will be run if executed in
55 * <code>ACTIVE</code> mode.
56 */
57 public void setActivePaths(List<StructurePath> activePaths);
58 }