Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mentawai.core
Class ApplicationManager  view ApplicationManager download ApplicationManager.java

java.lang.Object
  extended byorg.mentawai.core.ApplicationManager

public abstract class ApplicationManager
extends java.lang.Object

The central abstract base manager which controls actions, filters, locales and data lists. You can use this class to register actions and filters through the loadActions() method. You can use this class to specify supported locales through the loadLocales() method. You can use this class to manage the data list loading process. You can use this class to initialize anything for your web application.


Field Summary
private  java.util.Map actions
           
private  java.util.Map globalConsequences
           
private  java.util.List globalFilters
           
private  java.util.List globalFiltersLast
           
private  java.util.Map innerActions
           
private static java.lang.String REALPATH
           
 
Constructor Summary
ApplicationManager()
           
 
Method Summary
 void addActionConfig(ActionConfig ac)
          Register an ActionConfig for the Mentawai controller.
 void addGlobalConsequence(java.lang.String result, Consequence c)
          Register a consequence for all actions in this application manager.
 void addGlobalFilter(Filter filter)
          Register a filter for all actions in this application manager.
 void addGlobalFilter(Filter filter, boolean last)
          Register a filter for all actions in this application manager.
 void addGlobalFilter(java.util.List filters)
          Register a list of filters for all actions in this application manager.
 void addGlobalFilter(java.util.List filters, boolean last)
          Register a list of filters for all actions in this application manager.
 ActionConfig getActionConfig(java.lang.String name)
          Gets the ActionConfig with the given name or alias.
 ActionConfig getActionConfig(java.lang.String name, java.lang.String innerAction)
          Gets the Inner ActionConfig with the given name and inner action.
(package private)  java.util.Set getAllFilters()
           
 Consequence getGlobalConsequence(java.lang.String result)
          Gets a global consequence associated with the result.
 java.util.List getGlobalFilters()
          Gets all the global filters registered in this application manager.
 java.util.List getGlobalFilters(boolean last)
          Gets the global filters registered in this application manager.
static java.lang.String getRealPath()
          Returns this web application's real path.
 void init()
          Deprecated. Use init(Context application) instead.
 void init(Context application)
          Override this method to do any initialization for your web application.
 void loadActions()
          Override this method to register actions and filters in this application manager.
 void loadLists()
          Override this method to control the data list loading process.
 void loadLocales()
          Override this method to specify the supported locales for your application.
static void setRealPath(java.lang.String realpath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REALPATH

private static java.lang.String REALPATH

actions

private java.util.Map actions

innerActions

private java.util.Map innerActions

globalFilters

private java.util.List globalFilters

globalFiltersLast

private java.util.List globalFiltersLast

globalConsequences

private java.util.Map globalConsequences
Constructor Detail

ApplicationManager

public ApplicationManager()
Method Detail

setRealPath

public static void setRealPath(java.lang.String realpath)

getRealPath

public static java.lang.String getRealPath()
Returns this web application's real path. For example: c:\program files\tomcat\webapps\myapplication


addActionConfig

public void addActionConfig(ActionConfig ac)
Register an ActionConfig for the Mentawai controller.


init

public void init()
Deprecated. Use init(Context application) instead.

Override this method to do any initialization for your web application.


init

public void init(Context application)
Override this method to do any initialization for your web application.

Since:
1.1

loadActions

public void loadActions()
Override this method to register actions and filters in this application manager.


loadLocales

public void loadLocales()
Override this method to specify the supported locales for your application.


loadLists

public void loadLists()
               throws java.io.IOException
Override this method to control the data list loading process.


getActionConfig

public ActionConfig getActionConfig(java.lang.String name)
Gets the ActionConfig with the given name or alias.


getActionConfig

public ActionConfig getActionConfig(java.lang.String name,
                                    java.lang.String innerAction)
Gets the Inner ActionConfig with the given name and inner action.


addGlobalFilter

public void addGlobalFilter(Filter filter)
Register a filter for all actions in this application manager. The filters registered with this method will be executed before the specific action filters.


addGlobalFilter

public void addGlobalFilter(java.util.List filters)
Register a list of filters for all actions in this application manager. The filters registered with this method will be executed before the specific action filters.

Since:
1.1.1

addGlobalFilter

public void addGlobalFilter(Filter filter,
                            boolean last)
Register a filter for all actions in this application manager.

Since:
1.1.1

addGlobalFilter

public void addGlobalFilter(java.util.List filters,
                            boolean last)
Register a list of filters for all actions in this application manager.

Since:
1.1.1

addGlobalConsequence

public void addGlobalConsequence(java.lang.String result,
                                 Consequence c)
Register a consequence for all actions in this application manager. A global consequence has precedence over action consequences.


getGlobalFilters

public java.util.List getGlobalFilters(boolean last)
Gets the global filters registered in this application manager.

Since:
1.1.1

getGlobalFilters

public java.util.List getGlobalFilters()
Gets all the global filters registered in this application manager. Note that it will sum up in a list the filters executed before and after the specific action filters.


getGlobalConsequence

public Consequence getGlobalConsequence(java.lang.String result)
Gets a global consequence associated with the result.


getAllFilters

java.util.Set getAllFilters()