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