]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultFolder.java
Add doAs in RCP CmsView.
[gpl/argeo-slc.git] / org.argeo.slc.client.ui / src / org / argeo / slc / client / ui / model / ResultFolder.java
1 package org.argeo.slc.client.ui.model;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.argeo.slc.SlcException;
7 import org.argeo.slc.SlcNames;
8
9 /**
10 * UI Tree component that wrap a node of type ResultFolder. list either other
11 * folders and/or a list of results. keeps a reference to its parent.
12 */
13 public class ResultFolder extends ParentNodeFolder {
14
15 /**
16 *
17 * @param parent
18 * @param node
19 * throws an exception if null
20 * @param name
21 */
22 public ResultFolder(ParentNodeFolder parent, Node node, String name) {
23 super(parent, node, name);
24 try {
25 // initialize passed status if possible
26 if (node.hasNode(SlcNames.SLC_AGGREGATED_STATUS))
27 setPassed(node.getNode(SlcNames.SLC_AGGREGATED_STATUS)
28 .getProperty(SlcNames.SLC_SUCCESS).getBoolean());
29 } catch (RepositoryException re) {
30 throw new SlcException(
31 "Unexpected error while initializing result folder : "
32 + getName(), re);
33 }
34 }
35
36 // /**
37 // * Overriden to return an ordered list of children
38 // */
39 // public synchronized Object[] getChildren() {
40 // Object[] children = super.getChildren();
41 // return ResultParentUtils.orderChildren(children);
42 // }
43 //
44 // public int compareTo(ResultFolder o) {
45 // return super.compareTo(o);
46 // }
47 }