KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > importexport > ImportExportUtils


1 package org.jahia.services.importexport;
2
3 import org.jahia.params.ParamBean;
4 import org.jahia.content.comparators.ObjectTypeDispatcherComparator;
5 import org.jahia.content.comparators.ContainerComparator;
6 import org.jahia.content.comparators.ContainerListComparator;
7 import org.jahia.content.ContentContainerKey;
8 import org.jahia.content.ContentContainerListKey;
9
10 import java.util.List JavaDoc;
11 import java.util.Collections JavaDoc;
12
13 /**
14  * Created by IntelliJ IDEA.
15  * User: toto
16  * Date: 19 ao�t 2005
17  * Time: 16:18:51
18  * To change this template use File | Settings | File Templates.
19  */

20 public class ImportExportUtils {
21     public static void orderContainerList(List JavaDoc l, ParamBean jParams) {
22         ObjectTypeDispatcherComparator comparator = new
23                 ObjectTypeDispatcherComparator();
24         comparator.addTypeComparator(ContentContainerKey.CONTAINER_TYPE,
25                 new ContainerComparator(jParams));
26         comparator.addTypeComparator(ContentContainerListKey.
27                 CONTAINERLIST_TYPE,
28                 new ContainerListComparator());
29         Collections.sort(l, comparator);
30     }
31 }
32
Popular Tags