+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.structure;\r
-\r
-import java.util.List;\r
-\r
-/** Registry where the whole structure is stored. */\r
-public interface StructureRegistry<P extends StructurePath> {\r
- /** Read mode: the structure is only read. */\r
- public static String READ = "READ";\r
- /** All mode: everything is executed regardless of the active paths. */\r
- public static String ALL = "ALL";\r
- /** Active mode: only the active paths are executed. */\r
- public static String ACTIVE = "ACTIVE";\r
-\r
- /** Adds an element to the registry. */\r
- public void register(P path, StructureElement element);\r
-\r
- /** Lists <b>all</b> registered elements. */\r
- public List<StructureElement> listElements();\r
-\r
- /** Lists <b>all</b> registered elements. */\r
- public List<P> listPaths();\r
-\r
- /** Gets a element based on its path. */\r
- public <T extends StructureElement> T getElement(P path);\r
-\r
- /**\r
- * Set the interpreter mode: read, all or active.\r
- * \r
- * @see #READ\r
- * @see #ALL\r
- * @see #STATUS_ACTIVE\r
- */\r
- public void setMode(String mode);\r
-\r
- /**\r
- * Gets the current interpreter mode.\r
- * \r
- * @see #READ\r
- * @see #ALL\r
- * @see #STATUS_ACTIVE\r
- */\r
- public String getMode();\r
-\r
- /**\r
- * Gets the list of active paths, which will be run if executed in\r
- * <code>STATUS_ACTIVE</code> mode.\r
- */\r
- public List<P> getActivePaths();\r
-\r
- /**\r
- * Sets the list of active path, which will be run if executed in\r
- * <code>STATUS_ACTIVE</code> mode.\r
- */\r
- public void setActivePaths(List<P> activePaths);\r
-}\r