]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleTask.java
Various fixes so that SLC example works again
[gpl/argeo-slc.git] / org.argeo.slc.example / src / main / java / org / argeo / slc / example / ExampleTask.java
index 3dc8aad2e3bf7c538f6344c3b89cfe29fd1e8278..1af3c1838910f4143423a3a76cec65c94c09f95a 100644 (file)
@@ -1,7 +1,9 @@
 package org.argeo.slc.example;\r
 \r
+import org.argeo.slc.core.structure.SimpleSElement;\r
 import org.argeo.slc.core.structure.StructureAware;\r
 import org.argeo.slc.core.structure.StructureElement;\r
+import org.argeo.slc.core.structure.StructureElementProvider;\r
 import org.argeo.slc.core.structure.StructurePath;\r
 import org.argeo.slc.core.structure.StructureRegistry;\r
 import org.argeo.slc.core.structure.tree.TreeSPath;\r
@@ -11,8 +13,8 @@ import org.argeo.slc.core.test.TestResult;
 import org.argeo.slc.core.test.TestRun;\r
 \r
 /** Example task. */\r
-public class ExampleTask implements StructureAware, TestDefinition,\r
-               StructureElement {\r
+public class ExampleTask implements StructureAware<TreeSPath>, TestDefinition,\r
+               StructureElementProvider {\r
        private TreeSPath path;\r
        private String description;\r
 \r
@@ -24,12 +26,13 @@ public class ExampleTask implements StructureAware, TestDefinition,
                result.addResultPart(part);\r
        }\r
 \r
-       public void notifyCurrentPath(StructureRegistry registry, StructurePath path) {\r
-               this.path = (TreeSPath) path;\r
+       public void notifyCurrentPath(StructureRegistry<TreeSPath> registry,\r
+                       TreeSPath path) {\r
+               this.path = path;\r
        }\r
 \r
-       public String getLabel() {\r
-               return description;\r
+       public StructureElement createStructureElement() {\r
+               return new SimpleSElement(description);\r
        }\r
 \r
        /** Sets the description. */\r