|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.ui.AbstractRepositoryBrowser
public abstract class AbstractRepositoryBrowser
Partial implementation of RepositoryBrowser used as a superclass for actual implementations so code can be shared where appropriate. Reads properties from media.properties: repository.browser.create.class=edu.internet2.middleware.grouper.ui.CreateRepositoryBrowser repository.browser.create.flat-capable=true repository.browser.create.root-node= repository.browser.create.hide-pre-root-node=true repository.browser.create.flat-privs=CREATE STEM repository.browser.create.flat-type=stem repository.browser.create.search=stems repository.browser.create.initial-stems=edu...InitialStemsImpl
Property | Value | Description |
class | edu.internet2.middleware.grouper.ui.CreateRepositoryBrowser | RepositoryBrowserFactory.getInstance("Create") looks up this key and returns an instance of the class specified by the value |
flat-capable | true | Indicates that the hierarchy can be hidden and a list of stems or groups (according to flat-type) shown |
flat-type | stem | Currently, all other browse modes have a flat-type=group |
flat-privs | CREATE STEM | The current subject must have one of these privs before a stem or group is listed |
root-node | Name of a stem where browsing starts. Defaults to empty = root node, but could be at any level in the hierarchy. If not specified will look at media.properties:default.browse.stem | |
hide-pre-root-node | true | If a root node is specified this property determines if the user can browse to ancestor nodes of the root node. This feature can be used to present a restricted view of the hierarchy within the repository |
search | groups / stems | Indicates what to search |
initial-stems | edu...InitialStemsImpl | class name for an InitialStems implementation. Defaults to media.properties:plugin.initialstems value |
By modifying these properties or writing new implementations sites can customize the behaviour of existing browse modes, and create their own. Coupled with the ability to control menu items, sites can adapt the Grouper UI to institutional requirements
Constructor Summary | |
---|---|
AbstractRepositoryBrowser()
Default no argument constructor |
Method Summary | |
---|---|
List |
advancedSearch(GrouperSession s,
String from,
Map attr,
List outTerms)
Advanced search of repository |
List |
advancedStemSearch(GrouperSession s,
String from,
Map attr,
List outTerms)
Only accessible from Create groups, implements stem search logic |
Set<Group> |
getChildGroups(Stem stem,
QueryOptions queryOptions)
get child groups from a stem |
List<GroupOrStem> |
getChildren(GrouperSession s,
String stemId,
int start,
int pageSize,
int[] resultSize)
Given a GrouperStem id return a list of stems and groups for which the GrouperStem is an immediate parent |
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 |
List<GroupAsMap> |
getChildrenAsMaps(GrouperSession s,
String stemId,
int start,
int pageSize,
int[] resultSize)
Given a GrouperStem id return a list of Maps representing the children of that stem. |
Set<Stem> |
getChildStems(Stem stem)
get child stems to show |
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 bundle,
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractRepositoryBrowser()
Method Detail |
---|
public void init(GrouperSession s, ResourceBundle bundle, ResourceBundle mediaBundle)
RepositoryBrowser
init
in interface RepositoryBrowser
public String getFlattenType()
RepositoryBrowser
getFlattenType
in interface RepositoryBrowser
public Set getChildren(String node, String listField, int start, int pageSize, StringBuffer totalCount, boolean isFlat, boolean isForAssignment, String omitForAssignment, String context, HttpServletRequest request) throws Exception
RepositoryBrowser
getChildren
in interface RepositoryBrowser
start
- 0 based start index
Exception
edu.internet2.middleware.grouper.ui.RepositoryBrowser#getChildren(java.lang.String, int, int, java.lang.StringBuffer, boolean, boolean)
public String getInitialStems()
RepositoryBrowser
getInitialStems
in interface RepositoryBrowser
public List getParentStems(GroupOrStem groupOrStem) throws Exception
RepositoryBrowser
getParentStems
in interface RepositoryBrowser
Exception
public List search(GrouperSession s, String query, String from, Map attr, List outTerms) throws Exception
RepositoryBrowser
search
in interface RepositoryBrowser
Exception
public List advancedStemSearch(GrouperSession s, String from, Map attr, List outTerms) throws Exception
s
- from
- attr
- outTerms
-
Exception
public List advancedSearch(GrouperSession s, String from, Map attr, List outTerms) throws Exception
RepositoryBrowser
advancedSearch
in interface RepositoryBrowser
outTerms
- - empty list used to return info for deriving human readable query
Exception
public boolean isFlatCapable()
RepositoryBrowser
isFlatCapable
in interface RepositoryBrowser
public String getRootNode()
RepositoryBrowser
getRootNode
in interface RepositoryBrowser
public boolean isHidePreRootNode()
RepositoryBrowser
isHidePreRootNode
in interface RepositoryBrowser
public List<GroupOrStem> getChildren(GrouperSession s, String stemId, int start, int pageSize, int[] resultSize) throws StemNotFoundException
s
- GrouperSession for authenticated userstemId
- GrouperStem idinPrivSet
- set of privileges the subject must have in each rowstart
- pageSize
- resultSize
- result size of whole resultset
StemNotFoundException
public Set<Group> getChildGroups(Stem stem, QueryOptions queryOptions)
stem
- scope
-
public Set<Stem> getChildStems(Stem stem)
stem
-
public List<GroupAsMap> getChildrenAsMaps(GrouperSession s, String stemId, int start, int pageSize, int[] resultSize) throws StemNotFoundException
s
- GrouperSession for authenticated userstemId
- inPrivSet
- rows must have privs herestart
- pageSize
- resultSize
-
StemNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |