org.apache.jetspeed.modules.actions.portlets
Class PortletFilter

java.lang.Object
  extended byorg.apache.jetspeed.modules.actions.portlets.PortletFilter

public abstract class PortletFilter
extends java.lang.Object

An abstract class with helper methods for filtering Portlets.

Version:
$Id: PortletFilter.java,v 1.3 2004/02/23 02:56:58 jford Exp $
Author:
Jeremy Ford

Constructor Summary
PortletFilter()
           
 
Method Summary
static java.util.List buildCategoryList(java.util.List portlets)
          Builds a list of all portlet categories
static java.util.List buildParentList(java.util.List portlets)
          Method that returns a list of parents from the provided list of portlets.
static java.util.List filterPortlets(java.util.List portlets, java.lang.String[] fields, java.lang.String[] values)
          Method that filters a list of portlets based on certain criteria.
static java.util.List filterPortlets(java.util.List portlets, java.lang.String field, java.lang.String value)
          Method that filters a list of portlets based on a give filter name/value.
static java.util.List getAllPortlets()
          Method to return all portlets in the Portlet Registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletFilter

public PortletFilter()
Method Detail

filterPortlets

public static java.util.List filterPortlets(java.util.List portlets,
                                            java.lang.String field,
                                            java.lang.String value)
Method that filters a list of portlets based on a give filter name/value.

Parameters:
portlets - List of portlets to filter
field - The name of the filter
value - The value of the filter
Returns:
List of portlets that met the filter criteria

filterPortlets

public static java.util.List filterPortlets(java.util.List portlets,
                                            java.lang.String[] fields,
                                            java.lang.String[] values)
Method that filters a list of portlets based on certain criteria.

Parameters:
portlets - The list of portlets to filter
fields - The list of fields
values - The list of values. This should be in a 1:1 ratio with the fields.
Returns:
List of portlets that met the filter criteria

buildCategoryList

public static java.util.List buildCategoryList(java.util.List portlets)
Builds a list of all portlet categories

Returns:
List of categories

getAllPortlets

public static java.util.List getAllPortlets()
Method to return all portlets in the Portlet Registry

Returns:
List of portlets

buildParentList

public static java.util.List buildParentList(java.util.List portlets)
Method that returns a list of parents from the provided list of portlets.

Parameters:
portlets - List of portlets to search for parents
Returns:
List of portlets that are parents


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.