edu.internet2.middleware.grouper.ui
Interface RepositoryBrowser

All Known Implementing Classes:
AbstractRepositoryBrowser, AllRepositoryBrowser, CreateRepositoryBrowser, JoinRepositoryBrowser, ManageRepositoryBrowser, MyMembershipsRepositoryBrowser

public interface RepositoryBrowser

Interface which allows pluggable business rules for browsing the Grouper repository. Default implementaions for My, Create, Manage, Join and All browse modes are provided. The appropriate RepositoryBrowser implemenation instance is loaded by the RepositoryBrowserFactory. The default implementations indicated above all extend AbstractRepositoryBowser.

Version:
$Id: RepositoryBrowser.java,v 1.9 2009-04-13 03:18:39 mchyzer Exp $
Author:
Gary Brown.

Method Summary
 List advancedSearch(GrouperSession s, String from, Map attr, List outTerms)
          Advanced search of repository
 Set getChildren(String node, String listField, int start, int pageSize, StringBuffer totalCount, boolean isFlat, boolean isForAssignment, String omitForAssignment, String context, HttpServletRequest request)
          Given a node return children as appropriate for browse mode
 String getFlattenType()
          stems or groups - used to create correct screen text
 String getInitialStems()
          Returns the name of the implementation - if there is one
 List getParentStems(GroupOrStem groupOrStem)
          Returns a list of parent stems as maps taking account of root node properties
 String getRootNode()
          Each browse mode can have its own root node.
 void init(GrouperSession s, ResourceBundle navBundle, ResourceBundle mediaBundle)
          Factory method uses no argument constructor.
 boolean isFlatCapable()
          Does this browse mode have a flat mode i.e.
 boolean isHidePreRootNode()
          Should the nodes before the root node be hidden?
 List search(GrouperSession s, String query, String from, Map attr, List outTerms)
          Search repository and return results as appropriate for the browse mode
 

Method Detail

init

void init(GrouperSession s,
          ResourceBundle navBundle,
          ResourceBundle mediaBundle)
Factory method uses no argument constructor. init passes in the essentials

Parameters:
s -
navBundle -
mediaBundle -

getChildren

Set getChildren(String node,
                String listField,
                int start,
                int pageSize,
                StringBuffer totalCount,
                boolean isFlat,
                boolean isForAssignment,
                String omitForAssignment,
                String context,
                HttpServletRequest request)
                throws Exception
Given a node return children as appropriate for browse mode

Parameters:
node -
start - 0 based start index
pageSize -
totalCount -
isFlat -
isForAssignment -
omitForAssignment -
context -
request -
Returns:
Set of children for current node
Throws:
Exception

isFlatCapable

boolean isFlatCapable()
Does this browse mode have a flat mode i.e. can it hide the hierarchy?

Returns:
whether user should have option to select an initial stems view

getFlattenType

String getFlattenType()
stems or groups - used to create correct screen text

Returns:
flatten type

getRootNode

String getRootNode()
Each browse mode can have its own root node.

Returns:
id of stem

isHidePreRootNode

boolean isHidePreRootNode()
Should the nodes before the root node be hidden?

Returns:
whether the nodes before the root node be hidden?

getInitialStems

String getInitialStems()
Returns the name of the implementation - if there is one

Returns:
the name of the Java class

getParentStems

List getParentStems(GroupOrStem groupOrStem)
                    throws Exception
Returns a list of parent stems as maps taking account of root node properties

Parameters:
groupOrStem -
Returns:
List of anvestor stems for specified group or stem
Throws:
Exception

search

List search(GrouperSession s,
            String query,
            String from,
            Map attr,
            List outTerms)
            throws Exception
Search repository and return results as appropriate for the browse mode

Parameters:
s -
query -
from -
attr -
Returns:
List of stems or groups. A human readable list of search terms is also returned if a List is provided
Throws:
Exception

advancedSearch

List advancedSearch(GrouperSession s,
                    String from,
                    Map attr,
                    List outTerms)
                    throws Exception
Advanced search of repository

Parameters:
s -
from -
attr -
outTerms - - empty list used to return info for deriving human readable query
Returns:
List of stems or groups. A human readable list of search terms is also returned if a List is provided
Throws:
Exception