1 package org
.argeo
.slc
.core
.structure
;
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";
14 /** Adds an element to the registry. */
15 public void register(StructurePath path
, StructureElement element
);
18 * Adds the wrapped element of a <code>SructureAware</code>, and
19 * propagates the registration.
21 public void register(StructurePath path
, StructureAware structureAware
);
23 /** Lists <b>all</b> registered elements. */
24 public List
<StructureElement
> listElements();
26 /** Lists <b>all</b> registered elements. */
27 public List
<StructurePath
> listPaths();
29 /** Gets a element based on its path. */
30 public StructureElement
getElement(StructurePath path
);
33 * Set the interpreter mode: read, all or active.
39 public void setMode(String mode
);
42 * Gets the current interpreter mode.
48 public String
getMode();
51 * Gets the list of active paths, which will be run if executed in
52 * <code>ACTIVE</code> mode.
54 public List
<StructurePath
> getActivePaths();
57 * Sets the list of active path, which will be run if executed in
58 * <code>ACTIVE</code> mode.
60 public void setActivePaths(List
<StructurePath
> activePaths
);