KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > content > comparators > ContainerComparator


1 package org.jahia.content.comparators;
2
3 import org.jahia.params.ParamBean;
4
5 /**
6  * <p>Title: Container comparator </p>
7  * <p>Description: This sub-class of the ordered comparator hard-codes it's
8  * sub-comparators in an order that is logic for containers.</p>
9  * <p>Copyright: Copyright (c) 2002</p>
10  * <p>Company: Jahia Ltd</p>
11  * @author Serge Huber
12  * @version 1.0
13  * @todo Can we remove the hard-coded configuration here and put it maybe in
14  * a configuration file ?
15  */

16
17 public class ContainerComparator extends OrderedCompositeComparator {
18     public ContainerComparator(ParamBean paramBean) {
19         super();
20         super.addComparator(new ContainerByContainerListComparator());
21         if (paramBean != null) {
22             super.addComparator(new ContainerRankingComparator(paramBean));
23         }
24     }
25
26 }
Popular Tags