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 ; 11 import java.util.Collections ; 12 13 20 public class ImportExportUtils { 21 public static void orderContainerList(List 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 |