// TODO is it really necessary closeDate == null ?\r
private Boolean isClosed = false;\r
\r
+ private Boolean cache = true;\r
+\r
private transient List<TestResultListener<TreeTestResult>> listeners = new Vector<TestResultListener<TreeTestResult>>();\r
\r
/** Sets the list of listeners. */\r
if (currentPath == null)\r
throw new SlcException("No current path set.");\r
\r
- PartSubList subList = resultParts.get(currentPath);\r
- if (subList == null) {\r
- subList = new PartSubList();\r
- resultParts.put(currentPath, subList);\r
+ if (cache) {\r
+ PartSubList subList = resultParts.get(currentPath);\r
+ if (subList == null) {\r
+ subList = new PartSubList();\r
+ resultParts.put(currentPath, subList);\r
+ }\r
+ subList.getParts().add(part);\r
}\r
+\r
if (part instanceof TestRunAware && currentTestRun != null) {\r
((TestRunAware) part).notifyTestRun(currentTestRun);\r
}\r
- subList.getParts().add(part);\r
\r
// notify listeners\r
synchronized (listeners) {\r
\r
public void notifyCurrentPath(StructureRegistry<TreeSPath> registry,\r
TreeSPath path) {\r
+ if (!cache)\r
+ return;\r
+\r
if (registry != null) {\r
for (TreeSPath p : path.getHierarchyAsList()) {\r
if (!elements.containsKey(p)) {\r
this.strictChecks = strictChecks;\r
}\r
\r
+ /**\r
+ * Whether information should be stored in thsi object or simply forwarded\r
+ * to teh listeners.\r
+ */\r
+ public void setCache(Boolean cache) {\r
+ this.cache = cache;\r
+ }\r
+\r
}\r