]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultFolder.java
2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.slc
.client
.ui
.model
;
18 import javax
.jcr
.Node
;
19 import javax
.jcr
.RepositoryException
;
21 import org
.argeo
.slc
.SlcException
;
22 import org
.argeo
.slc
.jcr
.SlcNames
;
25 * UI Tree component that wrap a node of type ResultFolder. list either other
26 * folders and/or a list of results. keeps a reference to its parent.
28 public class ResultFolder
extends ParentNodeFolder
{
34 * throws an exception if null
37 public ResultFolder(ParentNodeFolder parent
, Node node
, String name
) {
38 super(parent
, node
, name
);
40 // initialize passed status if possible
41 if (node
.hasNode(SlcNames
.SLC_AGGREGATED_STATUS
))
42 setPassed(node
.getNode(SlcNames
.SLC_AGGREGATED_STATUS
)
43 .getProperty(SlcNames
.SLC_SUCCESS
).getBoolean());
44 } catch (RepositoryException re
) {
45 throw new SlcException(
46 "Unexpected error while initializing result folder : "
52 // * Overriden to return an ordered list of children
54 // public synchronized Object[] getChildren() {
55 // Object[] children = super.getChildren();
56 // return ResultParentUtils.orderChildren(children);
59 // public int compareTo(ResultFolder o) {
60 // return super.compareTo(o);