]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleTask.java
Simplify ANt-Spring bridge
[gpl/argeo-slc.git] / org.argeo.slc.example / src / main / java / org / argeo / slc / example / ExampleTask.java
1 package org.argeo.slc.example;
2
3 import org.argeo.slc.core.structure.StructureAware;
4 import org.argeo.slc.core.structure.StructureElement;
5 import org.argeo.slc.core.structure.StructurePath;
6 import org.argeo.slc.core.structure.StructureRegistry;
7 import org.argeo.slc.core.structure.tree.TreeSPath;
8 import org.argeo.slc.core.test.SimpleResultPart;
9 import org.argeo.slc.core.test.TestDefinition;
10 import org.argeo.slc.core.test.TestResult;
11 import org.argeo.slc.core.test.TestRun;
12
13 /** Example task. */
14 public class ExampleTask implements StructureAware, TestDefinition,
15 StructureElement {
16 private TreeSPath path;
17 private String description;
18
19 public void execute(TestRun testRun) {
20 SimpleResultPart part = new SimpleResultPart(PASSED,
21 "Sub task with path " + path + " executed", null);
22
23 TestResult result = testRun.getTestResult();
24 result.addResultPart(part);
25 }
26
27 public void notifyCurrentPath(StructureRegistry registry, StructurePath path) {
28 this.path = (TreeSPath) path;
29 }
30
31 public String getLabel() {
32 return description;
33 }
34
35 /** Sets the description. */
36 public void setDescription(String description) {
37 this.description = description;
38 }
39
40 }