org.jpublish.action
Class ActionManager

java.lang.Object
  |
  +--org.jpublish.action.ActionManager

public class ActionManager
extends java.lang.Object


Constructor Summary
ActionManager(SiteContext siteContext)
           
 
Method Summary
 void addAction(java.lang.String name, Action action)
           
 java.lang.String execute(java.lang.String name, org.apache.velocity.VelocityContext context)
           
 java.lang.String executeGlobalActions(org.apache.velocity.VelocityContext context)
           
 java.lang.String executePathActions(java.lang.String path, org.apache.velocity.VelocityContext context)
           
 void executeStartupActions()
           
 Action findAction(java.lang.String name)
          Find an action with the given name.
 java.util.Map getDefinedActions()
           
 java.util.List getGlobalActions()
           
 java.util.List getPathActions()
           
 java.util.List getStartupActions()
           
 void removeAction(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionManager

public ActionManager(SiteContext siteContext)
Method Detail

getDefinedActions

public java.util.Map getDefinedActions()

addAction

public void addAction(java.lang.String name,
                      Action action)

removeAction

public void removeAction(java.lang.String name)

getStartupActions

public java.util.List getStartupActions()

getGlobalActions

public java.util.List getGlobalActions()

getPathActions

public java.util.List getPathActions()

executeStartupActions

public void executeStartupActions()
                           throws java.lang.Exception

executeGlobalActions

public java.lang.String executeGlobalActions(org.apache.velocity.VelocityContext context)
                                      throws java.lang.Exception

executePathActions

public java.lang.String executePathActions(java.lang.String path,
                                           org.apache.velocity.VelocityContext context)
                                    throws java.lang.Exception

execute

public java.lang.String execute(java.lang.String name,
                                org.apache.velocity.VelocityContext context)
                         throws java.lang.Exception

findAction

public Action findAction(java.lang.String name)
Find an action with the given name. The name may represent a partial file path rooted in the action root directory or it may be the name of an action registered with the ActionManager at startup.
Parameters:
name - The name of the action
Returns:
The action or null if no action is found


Copyright (C) 2001 Anthony Eden. All Rights Reserved.