]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/test/tree/TreeTestResult.java
Attachments management
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / test / tree / TreeTestResult.java
index c7fa530ace9a8a6b4ff9856cf74cf84fd1ee8c55..9ab13e9dc24e8282866e8d826d87bfdf52e481d7 100644 (file)
@@ -13,6 +13,7 @@ import org.apache.commons.logging.LogFactory;
 import org.argeo.slc.SlcException;\r
 import org.argeo.slc.core.attachment.Attachment;\r
 import org.argeo.slc.core.attachment.AttachmentsEnabled;\r
+import org.argeo.slc.core.attachment.SimpleAttachment;\r
 import org.argeo.slc.core.structure.tree.TreeSPath;\r
 import org.argeo.slc.structure.StructureAware;\r
 import org.argeo.slc.structure.StructureElement;\r
@@ -46,7 +47,7 @@ public class TreeTestResult implements TestResult, StructureAware<TreeSPath>,
 \r
        private SortedMap<TreeSPath, PartSubList> resultParts = new TreeMap<TreeSPath, PartSubList>();\r
        private SortedMap<TreeSPath, StructureElement> elements = new TreeMap<TreeSPath, StructureElement>();\r
-       private List<Attachment> attachments = new ArrayList<Attachment>();\r
+       private List<SimpleAttachment> attachments = new ArrayList<SimpleAttachment>();\r
 \r
        private Map<String, String> attributes = new TreeMap<String, String>();\r
 \r
@@ -219,16 +220,16 @@ public class TreeTestResult implements TestResult, StructureAware<TreeSPath>,
                this.warnIfAlreadyClosed = warnIfAlreadyClosed;\r
        }\r
 \r
-       public List<Attachment> getAttachments() {\r
+       public List<SimpleAttachment> getAttachments() {\r
                return attachments;\r
        }\r
 \r
-       public void setAttachments(List<Attachment> attachments) {\r
+       public void setAttachments(List<SimpleAttachment> attachments) {\r
                this.attachments = attachments;\r
        }\r
 \r
        public void addAttachment(Attachment attachment) {\r
-               attachments.add(attachment);\r
+               attachments.add((SimpleAttachment) attachment);\r
                synchronized (listeners) {\r
                        for (TestResultListener<TreeTestResult> listener : listeners) {\r
                                if (listener instanceof TreeTestResultListener)\r