com.jalios.jcms.portlet
Class PortalManager.CatDiscrimComparator

java.lang.Object
  extended by com.jalios.jcms.portlet.PortalManager.CatDiscrimComparator
All Implemented Interfaces:
Comparator<Category>
Enclosing class:
PortalManager

public static class PortalManager.CatDiscrimComparator
extends Object
implements Comparator<Category>

This inner class compare two categories. It is used to order a Category set in the same order than an array of root category and an array of contextual category. Each category gets point: - 1pt by RoutNavigate Level (First RootNavigate = +3 , Second RootNavigate = +2, Second RootNavigate = +1) - x2 for each contextual categories

Since:
jcms-5.5.0
Author:
Jean-Philippe Encausse

Field Summary
protected  Category[] discrim
           
protected  Category[] rootNav
           
 
Constructor Summary
PortalManager.CatDiscrimComparator(Category[] discrim, Category[] rootNav)
           
 
Method Summary
 int compare(Category c1, Category c2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

discrim

protected Category[] discrim

rootNav

protected Category[] rootNav
Constructor Detail

PortalManager.CatDiscrimComparator

public PortalManager.CatDiscrimComparator(Category[] discrim,
                                          Category[] rootNav)
Method Detail

compare

public int compare(Category c1,
                   Category c2)
Specified by:
compare in interface Comparator<Category>


Copyright © 2001-2010 Jalios SA. All Rights Reserved.