]>
git.argeo.org Git - gpl/argeo-slc.git/blob - structure/StructureRegistry.java
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.slc
.structure
;
19 import java
.util
.List
;
21 /** Registry where the whole structure is stored. */
22 public interface StructureRegistry
<P
extends StructurePath
> {
23 /** Read mode: the structure is only read. */
24 public static String READ
= "READ";
25 /** All mode: everything is executed regardless of the active paths. */
26 public static String ALL
= "ALL";
27 /** Active mode: only the active paths are executed. */
28 public static String ACTIVE
= "ACTIVE";
30 /** Adds an element to the registry. */
31 public void register(P path
, StructureElement element
);
33 /** Lists <b>all</b> registered elements. */
34 public List
<StructureElement
> listElements();
36 /** Lists <b>all</b> registered elements. */
37 public List
<P
> listPaths();
39 /** Gets a element based on its path. */
40 public <T
extends StructureElement
> T
getElement(P path
);
43 * Set the interpreter mode: read, all or active.
49 public void setMode(String mode
);
52 * Gets the current interpreter mode.
58 public String
getMode();
61 * Gets the list of active paths, which will be run if executed in
62 * <code>STATUS_ACTIVE</code> mode.
64 public List
<P
> getActivePaths();
67 * Sets the list of active path, which will be run if executed in
68 * <code>STATUS_ACTIVE</code> mode.
70 public void setActivePaths(List
<P
> activePaths
);