org.mentawai.core
Class ApplicationManager

java.lang.Object
  extended by org.mentawai.core.ApplicationManager
Direct Known Subclasses:
CoCApplicationManager, MultiApplicationManager, ScriptApplicationManager

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.

Author:
Sergio Oliveira Jr., Fernando Boaglio

Field Summary
static java.lang.String ACCESSDENIED
           
static int ACTION
           
static java.lang.String ALREADY
           
static int APPLICATION
           
static java.lang.String BLOCKED
           
static java.lang.String CREATED
           
static java.lang.String ERROR
           
static java.lang.String EXCEPTION
           
static java.lang.String EXTENSION
           
static java.lang.String INDEX
           
static int INPUT
           
static java.lang.String JSP
           
static java.lang.String LIST
           
static java.lang.String LOGIN
           
static java.lang.String MAIN
           
static java.lang.String MENTAWAI_BUILD
           
static java.lang.String MENTAWAI_VERSION
           
static int OUTPUT
           
static java.lang.String REDIR
           
static java.lang.String REMOVED
           
static int REQUEST
           
static int SESSION
           
static java.lang.String SHOW
           
static java.lang.String SUCCESS
           
static java.lang.String TEST
           
static java.lang.String UPDATED
           
 
Constructor Summary
ApplicationManager()
          Default constructor
 
Method Summary
 ActionConfig action(java.lang.Class<? extends java.lang.Object> klass)
          Convenient method that provides a less verbose way to create a ClassActionConfig.
 ActionConfig action(java.lang.Class<? extends java.lang.Object> klass, java.lang.String innerAction)
          Convenient method that provides a less verbose way to create a ClassActionConfig.
 ActionConfig action(java.lang.String name, java.lang.Class<? extends java.lang.Object> klass)
          Convenient method that provides a less verbose way to create an action config.
 ActionConfig action(java.lang.String name, java.lang.Class<? extends java.lang.Object> klass, java.lang.String innerAction)
          Convenient method that provides a less verbose way to create an action config.
 ActionConfig add(ActionConfig ac)
          Shorter version of addActionConfig.
 Component add(java.lang.String name, Component comp)
          Add an IOC component to this application manager.
 ActionConfig addActionConfig(ActionConfig ac)
          Register an ActionConfig for the Mentawai controller.
 void addActionPackage(java.lang.String actionPackage)
           
 BeanConfig addBeanConfig(BeanConfig bc)
           
 Component addComponent(java.lang.String name, Component comp)
          Add an IOC component to this application manager.
 Dependency addDependency(java.lang.Class<? extends java.lang.Object> klass, java.lang.String target)
           
 Dependency addDependency(java.lang.Class<? extends java.lang.Object> klass, java.lang.String target, java.lang.String source)
           
 void addGlobalConsequence(java.lang.String result, Consequence c)
          Register a consequence for all actions in this application manager.
 void addGlobalFilter(java.lang.Class<? extends java.lang.Object> klass, Filter filter, boolean last)
           
 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.
 void addList(DBListData list, ConnectionHandler connHandler)
          Adds the list to the ListManager, so there is no need to use ListManager.addList
 void addList(ListData listData)
          Adds the list to this ListManager, so there is no need to use ListManager.addList
static Consequence ajax(AjaxRenderer renderer)
           
 Dependency autoWiring(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass)
           
 Dependency autoWiring(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass, java.lang.String source)
           
 Dependency aw(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass)
           
 Dependency aw(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass, java.lang.String source)
           
 BeanConfig bean(java.lang.Class<? extends java.lang.Object> beanClass, java.lang.String tableName)
           
static Consequence chain(ActionConfig ac)
          Convenient method that provides a less verbose way to create a chain.
static Consequence chain(ActionConfig ac, java.lang.String innerAction)
          Convenient method that provides a less verbose way to create a chain.
static Consequence chain(java.lang.Class<? extends java.lang.Object> klass)
          Convenient method for setting a chain.
static Consequence chain(java.lang.Class<? extends java.lang.Object> klass, java.lang.String innerAction)
          Convenient method for setting a chain.
 void configureActions(java.lang.String packageName)
          Look inside a package and load all actions classes that implement the interface Configurable.
 void destroy(Context application)
          Called by the controller when the application is exiting.
 Dependency di(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass)
           
 Dependency di(java.lang.String target, java.lang.Class<? extends java.lang.Object> klass, java.lang.String source)
           
 void filter(java.lang.Class<? extends java.lang.Object> klass, Filter filter)
           
 void filter(Filter filter)
          Shorter version of addGlobalFilter.
 void filter(Filter filter, boolean last)
          Shorter version of addGlobalFilter.
 void filter(java.util.List filters)
          Shorter version of addGlobalFilter.
 void filter(java.util.List filters, boolean last)
          Shorter version of addGlobalFilter.
 void filterLast(java.lang.Class<? extends java.lang.Object> klass, Filter filter)
           
 void filterLast(Filter filter)
          Shorter version of addFlobalFilter.
 void filterLast(java.util.List filters)
          Shorter version of addGlobalFilter.
static Consequence fwd(java.lang.String page)
          Convenient method that provides a less verbose way to create a forward.
 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.
protected  java.util.Map<java.lang.String,ActionConfig> getActions()
           
static Context getApplication()
           
 BeanConfig getBeanConfig(java.lang.Class<? extends java.lang.Object> beanClass)
           
 Component getComponent(java.lang.String name)
          Gets an IOC component from this application manager.
static ActionConfig getDefaultAction()
           
 java.util.Iterator<Dependency> getDependencies()
           
 Consequence getGlobalConsequence(java.lang.String result)
          Gets a global consequence associated with the result.
 java.util.List<Filter> getGlobalFilters()
          Gets all the global filters registered in this application manager.
 java.util.List<Filter> getGlobalFilters(boolean last)
          Gets the global filters registered in this application manager.
 java.util.List<Filter> getGlobalFilters(java.lang.Class<? extends java.lang.Object> klass, boolean last)
           
static ApplicationManager getInstance()
           
 java.util.Properties getProperties()
           
static java.lang.String getRealPath()
          Returns this web application's real path.
 java.lang.String getReqCharEncoding()
           
static java.lang.String getViewDir()
           
 void init()
          Deprecated. Use init(Context application) instead.
 void init(Context application)
          Override this method to do any initialization for your web application.
 DefaultComponent ioc(java.lang.String name, java.lang.Class<? extends java.lang.Object> klass)
          Add an IOC component to this application manager.
 ScopeComponent ioc(java.lang.String name, java.lang.Class klass, int scope)
          Add an IOC component to this application manager.
 Component ioc(java.lang.String name, Component comp)
          Add an IOC component to this application manager.
 void loadActions()
          Override this method to register actions and filters in this application manager.
 void loadBeans()
          Override this method to register your mentabeans.
 void loadFormatters()
          Override this method to define formatters that can be used by mtw:out tag
 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.
 void on(java.lang.String result, Consequence c)
          Shorter version of addGlobalConsequence.
 void on(java.lang.String result, java.lang.String jsp)
          Shorter verions of addGlobalConsequence that will assume a forward.
static Consequence redir()
          Convenient method that provides a less verbose way to create a redirect.
static Consequence redir(boolean flag)
          Convenient method that provides a less verbose way to create a redirect.
static Consequence redir(java.lang.String page)
          Convenient method that provides a less verbose way to create a redirect.
static Consequence redir(java.lang.String page, boolean flag)
          Convenient method that provides a less verbose way to create a redirect.
 boolean removeActionConfig(ActionConfig ac)
          Remove an action config from this application manager.
 void removeActionPackage(java.lang.String actionPackage)
           
 void reset()
          Reset this application manager.
 ActionConfig ruby(java.lang.String klass)
           
 ActionConfig ruby(java.lang.String name, java.lang.String klass)
           
 ActionConfig ruby(java.lang.String name, java.lang.String klass, java.lang.String innerAction)
           
 void setAutoView(boolean autoView)
          Turn on/off auto view discovery.
 void setConsequenceProvider(ConsequenceProvider consequenceProvider)
          Sets the consequence provider that will be used by the controller.
 void setDateMaskForEverything(java.lang.String mask)
          Set default mask for the whole application
 void setDebugMode(boolean debugMode)
          Turn on/off the debug mode here.
 void setDebugMode(boolean debugMode, boolean commented)
          Turn on/off the debug mode here.
static void setDefaultAction(ActionConfig ac)
           
static void setRealPath(java.lang.String realpath)
           
 void setReloadable(boolean reloadable)
          Turn on/off application manager auto-reload feature.
 void setReloadMode(boolean reloadMode)
          Turn on/off the reload mode of application manager.
 void setReqCharEncoding(java.lang.String encoding)
           
 void setStatsMode(boolean statsMode)
          Turn on/off the statsMode mode here.
static void setViewDir(java.lang.String viewDir)
           
 ActionConfig spring(java.lang.String path, java.lang.String action)
          Convenient method that provides a less verbose way to create a SpringActionConfig.
 StreamConsequence stream(java.lang.String contentType)
           
 StringConsequence string(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
See Also:
Constant Field Values

SHOW

public static final java.lang.String SHOW
See Also:
Constant Field Values

LIST

public static final java.lang.String LIST
See Also:
Constant Field Values

INDEX

public static final java.lang.String INDEX
See Also:
Constant Field Values

MAIN

public static final java.lang.String MAIN
See Also:
Constant Field Values

LOGIN

public static final java.lang.String LOGIN
See Also:
Constant Field Values

ACCESSDENIED

public static final java.lang.String ACCESSDENIED
See Also:
Constant Field Values

TEST

public static final java.lang.String TEST
See Also:
Constant Field Values

JSP

public static final java.lang.String JSP
See Also:
Constant Field Values

CREATED

public static final java.lang.String CREATED
See Also:
Constant Field Values

UPDATED

public static final java.lang.String UPDATED
See Also:
Constant Field Values

REMOVED

public static final java.lang.String REMOVED
See Also:
Constant Field Values

ALREADY

public static final java.lang.String ALREADY
See Also:
Constant Field Values

BLOCKED

public static final java.lang.String BLOCKED
See Also:
Constant Field Values

ACTION

public static final int ACTION
See Also:
Constant Field Values

REQUEST

public static final int REQUEST
See Also:
Constant Field Values

INPUT

public static final int INPUT
See Also:
Constant Field Values

OUTPUT

public static final int OUTPUT
See Also:
Constant Field Values

SESSION

public static final int SESSION
See Also:
Constant Field Values

APPLICATION

public static final int APPLICATION
See Also:
Constant Field Values

EXCEPTION

public static final java.lang.String EXCEPTION

REDIR

public static final java.lang.String REDIR
See Also:
Constant Field Values

MENTAWAI_VERSION

public static final java.lang.String MENTAWAI_VERSION
See Also:
Constant Field Values

MENTAWAI_BUILD

public static final java.lang.String MENTAWAI_BUILD
See Also:
Constant Field Values

EXTENSION

public static java.lang.String EXTENSION
Constructor Detail

ApplicationManager

public ApplicationManager()
Default constructor

Method Detail

getApplication

public static Context getApplication()

getInstance

public static ApplicationManager getInstance()

setRealPath

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

setReqCharEncoding

public void setReqCharEncoding(java.lang.String encoding)

getReqCharEncoding

public java.lang.String getReqCharEncoding()

setDefaultAction

public static void setDefaultAction(ActionConfig ac)

getDefaultAction

public static ActionConfig getDefaultAction()

getProperties

public java.util.Properties getProperties()

stream

public StreamConsequence stream(java.lang.String contentType)

string

public StringConsequence string(java.lang.String key)

addActionPackage

public void addActionPackage(java.lang.String actionPackage)

removeActionPackage

public void removeActionPackage(java.lang.String actionPackage)

setViewDir

public static void setViewDir(java.lang.String viewDir)

getViewDir

public static java.lang.String getViewDir()

getRealPath

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

Returns:
The real path

reset

public void reset()
Reset this application manager. All configuration (actions, filters, etc) is discarded.


addActionConfig

public ActionConfig addActionConfig(ActionConfig ac)
Register an ActionConfig for the Mentawai controller. Note: Starting from version 1.2, this method is returning the action config it receives.

Parameters:
ac - The ActionConfig to register
Returns:
The ActionConfig it receives to register
Throws:
java.lang.IllegalStateException - if you try to add an action config with no name (internal action config)

addBeanConfig

public BeanConfig addBeanConfig(BeanConfig bc)

getBeanConfig

public BeanConfig getBeanConfig(java.lang.Class<? extends java.lang.Object> beanClass)

bean

public BeanConfig bean(java.lang.Class<? extends java.lang.Object> beanClass,
                       java.lang.String tableName)

removeActionConfig

public boolean removeActionConfig(ActionConfig ac)
Remove an action config from this application manager.

Parameters:
ac - The action config to remove
Returns:
true if removed, false if not found
Since:
1.8

add

public ActionConfig add(ActionConfig ac)
Shorter version of addActionConfig.

Parameters:
ac -
Returns:
The ActionConfig it receives
Since:
1.2

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.

Parameters:
application - The application context of your web application.
Since:
1.1

destroy

public void destroy(Context application)
Called by the controller when the application is exiting. OBS: This is called by the Controller servlet's destroy method.

Parameters:
application -
Since:
1.4

loadBeans

public void loadBeans()
Override this method to register your mentabeans.


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.

Throws:
java.io.IOException

loadFormatters

public void loadFormatters()
Override this method to define formatters that can be used by mtw:out tag


getActionConfig

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

Parameters:
name - The name of the ActionConfig
Returns:
The ActionConfig associated with the given name

getActions

protected java.util.Map<java.lang.String,ActionConfig> getActions()

getActionConfig

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

Parameters:
name - The name of the ActionConfig
innerAction - The inner action of the ActionConfig.
Returns:
The Inner ActionConfig associated 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.

Parameters:
filter - The filter to register as a global filter.

filter

public void filter(Filter filter)
Shorter version of addGlobalFilter.

Parameters:
filter -
Since:
1.2

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.

Parameters:
filters - A list of filters.
Since:
1.1.1

filter

public void filter(java.util.List filters)
Shorter version of addGlobalFilter.

Parameters:
filters -
Since:
1.2

addGlobalFilter

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

Parameters:
filter - The filter to register as a global filter.
last - true if you want this filter to be executed after the specific action filters.
Since:
1.1.1

addGlobalFilter

public void addGlobalFilter(java.lang.Class<? extends java.lang.Object> klass,
                            Filter filter,
                            boolean last)

filter

public void filter(java.lang.Class<? extends java.lang.Object> klass,
                   Filter filter)

filterLast

public void filterLast(java.lang.Class<? extends java.lang.Object> klass,
                       Filter filter)

filter

public void filter(Filter filter,
                   boolean last)
Shorter version of addGlobalFilter.

Parameters:
filter -
last -
Since:
1.2

filterLast

public void filterLast(Filter filter)
Shorter version of addFlobalFilter.

Parameters:
filter -
Since:
1.3

addGlobalFilter

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

Parameters:
filters - A list of filters.
last - true if you want these filters to be executed after the specific action filters.
Since:
1.1.1

filter

public void filter(java.util.List filters,
                   boolean last)
Shorter version of addGlobalFilter.

Parameters:
filters -
last -
Since:
1.2

filterLast

public void filterLast(java.util.List filters)
Shorter version of addGlobalFilter.

Parameters:
filters -
Since:
1.3

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.

Parameters:
result - The result for what a global consequence will be registered
c - The consequence to register as a global consequence

on

public void on(java.lang.String result,
               Consequence c)
Shorter version of addGlobalConsequence.

Parameters:
result -
c -
Since:
1.2

on

public void on(java.lang.String result,
               java.lang.String jsp)
Shorter verions of addGlobalConsequence that will assume a forward.

Parameters:
result -
jsp -
Since:
1.9

getGlobalFilters

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

Parameters:
last - true if you want the global filters registered to be executed after the specific action filters.
Returns:
A java.util.List with all the filters registered in this application manager.
Since:
1.1.1

getGlobalFilters

public java.util.List<Filter> getGlobalFilters(java.lang.Class<? extends java.lang.Object> klass,
                                               boolean last)

getGlobalFilters

public java.util.List<Filter> 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.

Returns:
A java.util.List with all the filters registered in this application manager.

getGlobalConsequence

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

Parameters:
result - The result for what to get a global consequence.
Returns:
A global consequence for the result.

fwd

public static Consequence fwd(java.lang.String page)
Convenient method that provides a less verbose way to create a forward. This is shorter than new Forward("/foo.jsp").

Parameters:
page -
Returns:
a new forward consequence
Since:
1.2

redir

public static Consequence redir(java.lang.String page)
Convenient method that provides a less verbose way to create a redirect. This is shorter than new Redirect("/foo.jsp").

Parameters:
page -
Returns:
a new redirect consequence
Since:
1.2

redir

public static Consequence redir(java.lang.String page,
                                boolean flag)
Convenient method that provides a less verbose way to create a redirect. This is shorter than new Redirect("/foo.jsp", true).

Parameters:
page -
flag -
Returns:
a new redirect consequence
Since:
1.3

redir

public static Consequence redir()
Convenient method that provides a less verbose way to create a redirect. This is shorter than new Redirect().

Returns:
a new redirect consequence
Since:
1.3

redir

public static Consequence redir(boolean flag)
Convenient method that provides a less verbose way to create a redirect. This is shorter than new Redirect().

Parameters:
flag -
Returns:
a new redirect consequence
Since:
1.4

chain

public static Consequence chain(ActionConfig ac)
Convenient method that provides a less verbose way to create a chain. This is shorter than new Chain("/foo.jsp").

Parameters:
ac - The action config to chain
Returns:
a new chain consequence
Since:
1.2

ajax

public static Consequence ajax(AjaxRenderer renderer)

chain

public static Consequence chain(ActionConfig ac,
                                java.lang.String innerAction)
Convenient method that provides a less verbose way to create a chain.

Parameters:
ac -
innerAction -
Returns:
a new chain consequence
Since:
1.12

chain

public static Consequence chain(java.lang.Class<? extends java.lang.Object> klass)
Convenient method for setting a chain.

Parameters:
klass -
Returns:
a new chain consequence
Since:
1.11

chain

public static Consequence chain(java.lang.Class<? extends java.lang.Object> klass,
                                java.lang.String innerAction)
Convenient method for setting a chain.

Parameters:
klass -
innerAction -
Returns:
a new chain consequence
Since:
1.11

action

public ActionConfig action(java.lang.Class<? extends java.lang.Object> klass)
Convenient method that provides a less verbose way to create a ClassActionConfig. Note: This will also add the action to this ApplicationManager, in other words, no need to call add or addActionConfig !!!

Parameters:
klass -
Returns:
a new ActionConfig
Since:
1.3

ruby

public ActionConfig ruby(java.lang.String klass)

ruby

public ActionConfig ruby(java.lang.String name,
                         java.lang.String klass)

ruby

public ActionConfig ruby(java.lang.String name,
                         java.lang.String klass,
                         java.lang.String innerAction)

spring

public ActionConfig spring(java.lang.String path,
                           java.lang.String action)
Convenient method that provides a less verbose way to create a SpringActionConfig. Note: This will also add the action to this ApplicationManager, in other words, no need to call add or addActionConfig !!!

Parameters:
path -
action -
Returns:
a new SpringActionConfig
Since:
1.3

action

public ActionConfig action(java.lang.String name,
                           java.lang.Class<? extends java.lang.Object> klass)
Convenient method that provides a less verbose way to create an action config. Note: This will also add the action to this ApplicationManager, in other words, no need to call add or addActionConfig !!!

Parameters:
name -
klass -
Returns:
a new action config
Since:
1.2

action

public ActionConfig action(java.lang.String name,
                           java.lang.Class<? extends java.lang.Object> klass,
                           java.lang.String innerAction)
Convenient method that provides a less verbose way to create an action config. Note: This will also add the action to this ApplicationManager, in other words, no need to call add or addActionConfig !!!

Parameters:
name -
klass -
innerAction -
Returns:
a new action config
Since:
1.2

action

public ActionConfig action(java.lang.Class<? extends java.lang.Object> klass,
                           java.lang.String innerAction)
Convenient method that provides a less verbose way to create a ClassActionConfig. Note: This will also add the action to this ApplicationManager, in other words, no need to call add or addActionConfig !!!

Parameters:
klass -
innerAction -
Returns:
a new ClassActionConfig
Since:
1.3

setReloadable

public void setReloadable(boolean reloadable)
Turn on/off application manager auto-reload feature. In order for this to work you must me using JavaRebel to force a class reload. More info here: http://www.javarebel.com

Parameters:
reloadable -

setDebugMode

public void setDebugMode(boolean debugMode)
Turn on/off the debug mode here. This can also be done in the web.xml file.

Parameters:
debugMode -

setDebugMode

public void setDebugMode(boolean debugMode,
                         boolean commented)
Turn on/off the debug mode here. This can also be done in the web.xml file.

Parameters:
debugMode -
commented -

setStatsMode

public void setStatsMode(boolean statsMode)
Turn on/off the statsMode mode here.

Parameters:
statsMode -

setReloadMode

public void setReloadMode(boolean reloadMode)
Turn on/off the reload mode of application manager. This can also be done in the web.xml file.

Parameters:
reloadMode -

addDependency

public Dependency addDependency(java.lang.Class<? extends java.lang.Object> klass,
                                java.lang.String target,
                                java.lang.String source)

addDependency

public Dependency addDependency(java.lang.Class<? extends java.lang.Object> klass,
                                java.lang.String target)

di

public Dependency di(java.lang.String target,
                     java.lang.Class<? extends java.lang.Object> klass)

di

public Dependency di(java.lang.String target,
                     java.lang.Class<? extends java.lang.Object> klass,
                     java.lang.String source)

autoWiring

public Dependency autoWiring(java.lang.String target,
                             java.lang.Class<? extends java.lang.Object> klass)

aw

public Dependency aw(java.lang.String target,
                     java.lang.Class<? extends java.lang.Object> klass,
                     java.lang.String source)

aw

public Dependency aw(java.lang.String target,
                     java.lang.Class<? extends java.lang.Object> klass)

autoWiring

public Dependency autoWiring(java.lang.String target,
                             java.lang.Class<? extends java.lang.Object> klass,
                             java.lang.String source)

getDependencies

public java.util.Iterator<Dependency> getDependencies()

setAutoView

public void setAutoView(boolean autoView)
Turn on/off auto view discovery. Default is on! This can also be done in the web.xml file. Auto view gives the controller the ability to generate forward consequences automatically for the results it cannot find a consequence, so that you don't need to define consequences for your actions in the configuration.

Parameters:
autoView -

addComponent

public Component addComponent(java.lang.String name,
                              Component comp)
Add an IOC component to this application manager.

Parameters:
name -
comp -
Returns:
The component just added

add

public Component add(java.lang.String name,
                     Component comp)
Add an IOC component to this application manager.

Parameters:
name -
comp -
Returns:
The component just added

getComponent

public Component getComponent(java.lang.String name)
Gets an IOC component from this application manager.

Parameters:
name -
Returns:
The ioc component

ioc

public Component ioc(java.lang.String name,
                     Component comp)
Add an IOC component to this application manager.

Parameters:
name -
comp -
Returns:
The component just added

ioc

public DefaultComponent ioc(java.lang.String name,
                            java.lang.Class<? extends java.lang.Object> klass)
Add an IOC component to this application manager.

Parameters:
name -
klass -
Returns:
The component just added

ioc

public ScopeComponent ioc(java.lang.String name,
                          java.lang.Class klass,
                          int scope)
Add an IOC component to this application manager.

Parameters:
name -
klass -
scope -
Returns:
The component just added

configureActions

public void configureActions(java.lang.String packageName)
Look inside a package and load all actions classes that implement the interface Configurable. Call the method configure to configure these actions. This is useful if you prefer to place the configuration for an action inside the action itself. OBS: By doing this you are spreading your configuration all over your code, so this is not recommended for serious projects. This boils down to a matter of taste, so Mentawai provides this as well.

Parameters:
packageName -

setConsequenceProvider

public void setConsequenceProvider(ConsequenceProvider consequenceProvider)
Sets the consequence provider that will be used by the controller.

Parameters:
consequenceProvider -
Since:
1.11

addList

public void addList(DBListData list,
                    ConnectionHandler connHandler)
Adds the list to the ListManager, so there is no need to use ListManager.addList

Parameters:
list -
connHandler -
Since:
1.11

addList

public void addList(ListData listData)
Adds the list to this ListManager, so there is no need to use ListManager.addList

Parameters:
listData -
Since:
1.11

setDateMaskForEverything

public void setDateMaskForEverything(java.lang.String mask)
Set default mask for the whole application

Parameters:
mask -
Since:
1.12


Copyright © 2005 Mentawai Team. All Rights Reserved.