Package org.apache.wiki

Examples of org.apache.wiki.PageSorter


            m_sorter = context.getEngine().getPageSorter();
        }
        else if( order.equalsIgnoreCase( PARAM_SORTORDER_JAVA ) )
        {
            // use Java "natural" ordering
            m_sorter = new PageSorter( JavaNaturalComparator.DEFAULT_JAVA_COMPARATOR );
        }
        else if( order.equalsIgnoreCase( PARAM_SORTORDER_LOCALE ) )
        {
            // use this locale's ordering
            m_sorter = new PageSorter( LocaleComparator.DEFAULT_LOCALE_COMPARATOR );
        }
        else if( order.equalsIgnoreCase( PARAM_SORTORDER_HUMAN ) )
        {
            // use human ordering
            m_sorter = new PageSorter( HumanComparator.DEFAULT_HUMAN_COMPARATOR );
        }
        else
            try
            {
                Collator collator = new RuleBasedCollator( order );
                collator.setStrength( Collator.PRIMARY );
                m_sorter = new PageSorter( new CollatorComparator( collator ) );
            }
            catch( ParseException pe )
            {
                log.info( "Failed to parse requested collator - using default ordering", pe );
                m_sorter = context.getEngine().getPageSorter();
View Full Code Here

TOP

Related Classes of org.apache.wiki.PageSorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.