]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc/src/main/java/org/argeo/slc/core/structure/StructureRegistry.java
Add test result part
[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 the active paths are executed. */
12 public static String ACTIVE = "ACTIVE";
13
14 /** Adds an element to the registry. */
15 public void register(StructurePath path, StructureElement element);
16
17 /**
18 * Adds the wrapped element of a <code>SructureAware</code>, and
19 * propagates the registration.
20 */
21 public void register(StructurePath path, StructureAware structureAware);
22
23 /** Lists <b>all</b> registered elements. */
24 public List<StructureElement> listElements();
25
26 /** Lists <b>all</b> registered elements. */
27 public List<StructurePath> listPaths();
28
29 /** Gets a element based on its path. */
30 public StructureElement getElement(StructurePath path);
31
32 /**
33 * Set the interpreter mode: read, all or active.
34 *
35 * @see #READ
36 * @see #ALL
37 * @see #ACTIVE
38 */
39 public void setMode(String mode);
40
41 /**
42 * Gets the current interpreter mode.
43 *
44 * @see #READ
45 * @see #ALL
46 * @see #ACTIVE
47 */
48 public String getMode();
49
50 /**
51 * Gets the list of active paths, which will be run if executed in
52 * <code>ACTIVE</code> mode.
53 */
54 public List<StructurePath> getActivePaths();
55
56 /**
57 * Sets the list of active path, which will be run if executed in
58 * <code>ACTIVE</code> mode.
59 */
60 public void setActivePaths(List<StructurePath> activePaths);
61 }