Keel 2.1RC2

org.keel.apps.navigate.models
Class Navigate

java.lang.Object
  extended byorg.keel.services.model.StandardModel
      extended byorg.keel.services.model.StandardLogEnabledModel
          extended byorg.keel.apps.navigate.models.Navigate
All Implemented Interfaces:
Configurable, LogEnabled, Model, Securable, ThreadSafe

public class Navigate
extends StandardLogEnabledModel
implements Securable, ThreadSafe

Model designed to permit easy navigation between and within Keel applications.
Navigate produces an output called "menu" with a series of nested outputs that lay out a hierarchical menu for access to application functionality, or to aribitrary URLs. A front-end is provided to display these menus as drop-down Javascript-based menus, but a "tree" style could just as easily be used, or any other representation (such as a series of hyperlinks, for example).
See the system.xconf for this application for an example of configuring this model. Generally, each application would provide additional configuration for it's own menus. If the menu element refers to a model, that model will only be included in the menu if authorization to access the model exists for the current user, so you probably want to make sure the user is logged in first (perhaps by using nav.navigation-seq).

Version:
$Revision: 1.18 $ $Date: 2004/03/08 15:42:46 $
Author:
Michael Nash

Field Summary
private  AuthorizationManager am
           
private static int maxLevels
           
static java.lang.String NAVMESSAGES_KEY
           
static java.lang.String PREFERENCES_KEY
           
 
Fields inherited from class org.keel.services.model.StandardLogEnabledModel
log
 
Fields inherited from class org.keel.services.model.StandardModel
configuration
 
Fields inherited from interface org.keel.services.model.Model
ROLE
 
Constructor Summary
Navigate()
           
 
Method Summary
private  void doChildrenOf(Configuration conf, ModelRequest req, ModelResponse res, Output parent, int level, java.util.List selected)
          Process the children of a specific configuration entry for a menu - called recursively to handle nesting
 ModelResponse execute(ModelRequest req)
           
 AuthorizationManager getAuthorizationManager()
           
 void setAuthorizationManager(AuthorizationManager newAm)
          Provide the service with a security manager.
 
Methods inherited from class org.keel.services.model.StandardLogEnabledModel
enableLogging
 
Methods inherited from class org.keel.services.model.StandardModel
configure, getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAVMESSAGES_KEY

public static java.lang.String NAVMESSAGES_KEY

PREFERENCES_KEY

public static java.lang.String PREFERENCES_KEY

am

private AuthorizationManager am

maxLevels

private static final int maxLevels
See Also:
Constant Field Values
Constructor Detail

Navigate

public Navigate()
Method Detail

execute

public ModelResponse execute(ModelRequest req)
                      throws ModelException
Specified by:
execute in interface Model
Throws:
ModelException

setAuthorizationManager

public void setAuthorizationManager(AuthorizationManager newAm)
Description copied from interface: Securable
Provide the service with a security manager. This security manager is used whenever a service needs to determine if the current principal is allowed to perform the requested operation. All instances of the same Securable service will have the same authorizations - if you need per- instance authorization, see InstanceSecurable.

Specified by:
setAuthorizationManager in interface Securable

doChildrenOf

private void doChildrenOf(Configuration conf,
                          ModelRequest req,
                          ModelResponse res,
                          Output parent,
                          int level,
                          java.util.List selected)
                   throws ModelException
Process the children of a specific configuration entry for a menu - called recursively to handle nesting

Parameters:
conf -
req -
res -
parent -
level -
Throws:
ModelException

getAuthorizationManager

public AuthorizationManager getAuthorizationManager()
Specified by:
getAuthorizationManager in interface Securable
See Also:
Securable.getAuthorizationManager()

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.