info.aduna.webapp.navigation
Class Group

java.lang.Object
  extended by info.aduna.webapp.navigation.NavigationNodeBase
      extended by info.aduna.webapp.navigation.Group
All Implemented Interfaces:
NavigationNode, Cloneable
Direct Known Subclasses:
NavigationModel

public class Group
extends NavigationNodeBase

Group represents a logical group of views in a NavigationModel.

Author:
Herko ter Horst

Field Summary
protected  Map<String,Group> groups
           
protected  Map<String,View> viewNames
           
protected  Map<String,View> views
           
 
Fields inherited from class info.aduna.webapp.navigation.NavigationNodeBase
i18n, icon, path, viewSuffix
 
Constructor Summary
Group(String id)
          Construct a new group with the specified ID.
 
Method Summary
 void addGroup(Group group)
          Add a group to this group.
 void addView(View view)
          Add a view to this group.
 Object clone()
           
protected  void copyGroupsAndViews(Group group)
           
protected  View findViewInternal(String viewName)
           
 Group getGroup(String id)
          Get the sub-group with the specified ID.
 List<Group> getGroups()
          Get the list of sub-groups
 View getView(String viewId)
           
 View getViewByName(String viewName)
          Get the view with the specified name.
 List<View> getViews()
          Get the list of views.
 
Methods inherited from class info.aduna.webapp.navigation.NavigationNodeBase
copyCommonAttributes, equals, getDepth, getI18n, getI18nPrefix, getI18nSeparator, getI18nSuffix, getIcon, getIconPrefix, getIconSeparator, getIconSuffix, getId, getParent, getPath, getPathPrefix, getPathSeparator, getViewSuffix, hashCode, isEnabled, isHidden, isParent, setEnabled, setHidden, setI18n, setIcon, setParent, setPath, setViewSuffix
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groups

protected Map<String,Group> groups

views

protected Map<String,View> views

viewNames

protected Map<String,View> viewNames
Constructor Detail

Group

public Group(String id)
Construct a new group with the specified ID.

Parameters:
id - the ID of the group
Method Detail

addGroup

public void addGroup(Group group)
Add a group to this group. The group becomes a sub-group of this group.

Parameters:
group - the group to add

getGroup

public Group getGroup(String id)
Get the sub-group with the specified ID.

Parameters:
id - the ID of the sub-group
Returns:
the sub-group with the specified ID, or null if this group doesn't contain a sub-group with that ID

getGroups

public List<Group> getGroups()
Get the list of sub-groups

Returns:
the list of sub-groups

addView

public void addView(View view)
Add a view to this group.

Parameters:
view - the view to add

getView

public View getView(String viewId)

getViewByName

public View getViewByName(String viewName)
Get the view with the specified name.

Parameters:
viewName - the name of the view (ID+suffix)
Returns:
the view with the specified name, or null if this group doesn't contain a view with that name

findViewInternal

protected View findViewInternal(String viewName)

getViews

public List<View> getViews()
Get the list of views.

Returns:
the list of views

clone

public Object clone()
Overrides:
clone in class Object

copyGroupsAndViews

protected void copyGroupsAndViews(Group group)


Copyright © 1997-2008 Aduna. All Rights Reserved.