]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/StructureRegistry.java
Improve web services
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / structure / StructureRegistry.java
index 6461ee5b94dc27eabc67d3a7fe3b7f16088706bb..e9091640840f3197141f91b77c874c04844e4845 100644 (file)
@@ -3,7 +3,7 @@ package org.argeo.slc.core.structure;
 import java.util.List;\r
 \r
 /** Registry where the whole structure is stored. */\r
-public interface StructureRegistry {\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
@@ -12,23 +12,23 @@ public interface StructureRegistry {
        public static String ACTIVE = "ACTIVE";\r
 \r
        /** Adds an element to the registry. */\r
-       public void register(StructurePath path, StructureElement element);\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<StructurePath> listPaths();\r
+       public List<P> listPaths();\r
 \r
        /** Gets a element based on its path. */\r
-       public StructureElement getElement(StructurePath 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 #ACTIVE\r
+        * @see #STATUS_ACTIVE\r
         */\r
        public void setMode(String mode);\r
 \r
@@ -37,19 +37,19 @@ public interface StructureRegistry {
         * \r
         * @see #READ\r
         * @see #ALL\r
-        * @see #ACTIVE\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>ACTIVE</code> mode.\r
+        * <code>STATUS_ACTIVE</code> mode.\r
         */\r
-       public List<StructurePath> getActivePaths();\r
+       public List<P> getActivePaths();\r
 \r
        /**\r
         * Sets the list of active path, which will be run if executed in\r
-        * <code>ACTIVE</code> mode.\r
+        * <code>STATUS_ACTIVE</code> mode.\r
         */\r
-       public void setActivePaths(List<StructurePath> activePaths);\r
+       public void setActivePaths(List<P> activePaths);\r
 }\r