X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Ftest%2Ftree%2FTreeTestResult.java;h=eadfbef58a128ecc1f374d71744634c871b0cd9e;hb=2916f0d4e65111ecf97e16517f490be25c878ed9;hp=dc9de9a5114a3bb7adfecf3a98dd3d4955e43dd3;hpb=a7c97f979bc26dd6a666b6ed5886a6dddd8b219f;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/TreeTestResult.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/TreeTestResult.java index dc9de9a51..eadfbef58 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/TreeTestResult.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/TreeTestResult.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.argeo.slc.core.test.tree; import java.io.Serializable; @@ -32,30 +48,30 @@ import org.argeo.slc.test.TestRunAware; */ public class TreeTestResult implements TestResult, StructureAware, Comparable, AttachmentsEnabled, Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; private final static Log log = LogFactory.getLog(TreeTestResult.class); - private List> listeners = new Vector>(); - - private TreeSPath currentPath; - private TestRun currentTestRun; - - private Date closeDate; - - private Boolean isClosed = false; - - private Boolean warnIfAlreadyClosed = true; - + // Persistence data private String uuid = UUID.randomUUID().toString(); + private Date closeDate; private SortedMap resultParts = new TreeMap(); private SortedMap elements = new TreeMap(); private List attachments = new ArrayList(); + // Headers. Used to accelerate request on a specific test result. private Map attributes = new TreeMap(); + // Runtime Data + private TreeSPath currentPath; + private transient TestRun currentTestRun; + private Boolean warnIfAlreadyClosed = true; private Boolean strictChecks = false; + // TODO is it really necessary closeDate == null ? + private Boolean isClosed = false; + + private transient List> listeners = new Vector>(); /** Sets the list of listeners. */ public void setListeners(List> listeners) { @@ -69,7 +85,7 @@ public class TreeTestResult implements TestResult, StructureAware, + " consider changing the scope of this test result:" + " you are referencing the same stored data with each new call.", null); - + if (currentPath == null) throw new SlcException("No current path set."); @@ -129,8 +145,10 @@ public class TreeTestResult implements TestResult, StructureAware, return resultParts; } - /** Used by ORM systems. */ - void setResultParts(SortedMap resultParts) { + /** + * Used by ORM systems. Changed to public in order to enable jcr persistence + */ + public void setResultParts(SortedMap resultParts) { this.resultParts = resultParts; }