|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.ActionConfig
public class ActionConfig
An ActionConfig links together an action implementation, an action name or alias, action results and action consequences. It makes it possible for an action implementation to be re-used in different situations with different names and consequences.
| Field Summary | |
|---|---|
protected Class<? extends Object> |
actionClass
|
| Constructor Summary | |
|---|---|
ActionConfig(Class<? extends Object> klass)
Creates an ActionConfig for the given action implementation. |
|
ActionConfig(Class<? extends Object> klass,
String innerAction)
Creates an ActionConfig with the given name for the given inner action implementation. |
|
ActionConfig(String name,
Class<? extends Object> klass)
Creates an ActionConfig with the given name for the given action implementation. |
|
ActionConfig(String name,
Class<? extends Object> klass,
String innerAction)
Creates an ActionConfig for the given action implementation. |
|
| Method Summary | |
|---|---|
ActionConfig |
addConsequence(String result,
Consequence c)
Adds a consequence for the given result. |
ActionConfig |
addConsequence(String result,
String innerAction,
Consequence c)
Adds a consequence for the given result of the given inner action. |
ActionConfig |
addFilter(Filter filter)
Adds a filter for the action. |
ActionConfig |
addFilter(Filter filter,
String... args)
Adds a filter to a list of inner actions. |
ActionConfig |
addFilter(Filter filter,
String innerAction)
Adds a filter for this inner action. |
ActionConfig |
addFilter(List filters)
Adds a list of filter for the action. |
ActionConfig |
addFilter(List filters,
String innerAction)
Adds a list of filter for the inner action. |
ActionConfig |
addFilterFirst(Filter filter)
Adds a filter that will be executed before the global filters. |
ActionConfig |
addFilterFirst(Filter filter,
String innerAction)
Adds a filter that will be executed before the global filters. |
ActionConfig |
addFilterFirst(List filters)
Add a list of filters that will be executed before the global filters. |
ActionConfig |
addFilterFirst(List filters,
String innerAction)
Adds a list of filters that will be executed before the global filters. |
ActionConfig |
ajaxError(AjaxRenderer renderer)
Shorter version of a AjaxConsequence error. |
ActionConfig |
ajaxOk(AjaxRenderer renderer)
Shorter version of a AjaxConsequence success. |
ActionConfig |
catchAll(Consequence c)
|
ActionConfig |
chainError(ActionConfig actionConfig)
Shorter version of chain on error |
ActionConfig |
chainOk(ActionConfig actionConfig)
Shorter version of chain on success |
ActionConfig |
filter(Filter filter)
Shorter version of addFilter. |
ActionConfig |
filter(Filter filter,
String... args)
Shorter version. |
ActionConfig |
filter(Filter filter,
String innerAction)
Shorter version of addFilter. |
ActionConfig |
filter(List filters)
Shorter version of addFilter. |
ActionConfig |
filter(List filters,
String innerAction)
Shorter version of addFilter. |
ActionConfig |
filterFirst(Filter filter)
Add a list of filters that will be executed before the global filters. |
ActionConfig |
filterFirst(Filter filter,
String innerAction)
Add a list of filters that will be executed before the global filters. |
ActionConfig |
filterFirst(List filters)
Add a list of filters that will be executed before the global filters. |
ActionConfig |
filterFirst(List filters,
String innerAction)
Add a list of filters that will be executed before the global filters. |
ActionConfig |
fwdError(String page)
Shorter version of a forward on error. |
ActionConfig |
fwdOk(String page)
Shorter version of a forward on success. |
Action |
getAction()
Returns an action instance to be used with this request. |
Class<? extends Object> |
getActionClass()
Returns the action class for this action config. |
Consequence |
getAutoConsequence(String result,
String innerAction)
|
Consequence |
getCatchAll()
|
Consequence |
getConsequence(String result)
Gets the consequence for the given result. |
Consequence |
getConsequence(String result,
String innerAction)
Gets the consequence for the given result of the given inner action. |
protected String |
getDirFromClass(Class klass)
This method will imply a directory name from the action class name. |
List<Filter> |
getFilters()
Returns the filters for this action. |
List<Filter> |
getFilters(String innerAction)
Returns the filters for this inner action. |
List<Filter> |
getFirstFilters(String innerAction)
Returns the filters for this inner action, that will be executed before the global filters. |
String |
getInnerAction()
Gets the inner action that this action config represents. |
String |
getName()
Gets the name or alias of this ActionConfig. |
ActionConfig |
internalOnly()
|
boolean |
isInternalOnly()
|
ActionConfig |
on(String result,
Consequence c)
Shorter version of addConsequence. |
ActionConfig |
on(String result,
String jsp)
Shorter verions of addConsequence that will assume a forward. |
ActionConfig |
on(String result,
String innerAction,
Consequence c)
Shorter version of addConsequence. |
ActionConfig |
redirError()
Shorter version of a redir on error. |
ActionConfig |
redirError(String page)
Shorter version of a redir on error. |
ActionConfig |
redirError(String page,
boolean flag)
Shorter version of a redir on error. |
ActionConfig |
redirOk()
Shorter version of a redir on success. |
ActionConfig |
redirOk(String page)
Shorter version of a redir on success. |
ActionConfig |
redirOk(String page,
boolean flag)
Shorter version of a redir on success. |
String |
toString()
Returns the name of this ActionConfig. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Class<? extends Object> actionClass
| Constructor Detail |
|---|
public ActionConfig(Class<? extends Object> klass)
klass - The action implementation to use
public ActionConfig(String name,
Class<? extends Object> klass)
name - The name or alias of this ActionConfigklass - The action implementation to use
public ActionConfig(String name,
Class<? extends Object> klass,
String innerAction)
name - The name or alias of this ActionConfigklass - The action implementation to useinnerAction - The inner action to use
public ActionConfig(Class<? extends Object> klass,
String innerAction)
klass - The action implementation to useinnerAction - The inner action to use| Method Detail |
|---|
protected String getDirFromClass(Class klass)
klass - The action class name
public ActionConfig addConsequence(String result,
Consequence c)
result - A possible result of this ActionConfigc - The consequence for this result
public ActionConfig internalOnly()
public boolean isInternalOnly()
public ActionConfig on(String result,
Consequence c)
result - c -
public ActionConfig on(String result,
String jsp)
result - jsp -
public ActionConfig addConsequence(String result,
String innerAction,
Consequence c)
result - A possible result of this ActionConfiginnerAction - The inner action that can return this result.c - The consequence for this result
IllegalStateException - If this method is called for a action config specific to an inner action
public ActionConfig on(String result,
String innerAction,
Consequence c)
result - innerAction - c -
public ActionConfig addFilter(Filter filter)
filter - The filter to add for this action.
public ActionConfig filter(Filter filter)
filter -
public Consequence getCatchAll()
public ActionConfig catchAll(Consequence c)
public ActionConfig addFilter(Filter filter,
String innerAction)
filter - The filter to add for this inner action.innerAction - the inner action
public ActionConfig filterFirst(List filters)
filters -
public ActionConfig filterFirst(List filters,
String innerAction)
filters - innerAction -
public ActionConfig filterFirst(Filter filter)
filter -
public ActionConfig filterFirst(Filter filter,
String innerAction)
filter - innerAction -
public ActionConfig addFilterFirst(List filters)
filters -
public ActionConfig addFilterFirst(List filters,
String innerAction)
filters - innerAction -
public ActionConfig addFilterFirst(Filter filter)
filter -
public ActionConfig addFilterFirst(Filter filter,
String innerAction)
filter - innerAction -
public ActionConfig filter(Filter filter,
String innerAction)
filter - innerAction -
public ActionConfig addFilter(List filters)
filters - A list of filters.
public ActionConfig filter(List filters)
filters -
public ActionConfig fwdOk(String page)
page -
public ActionConfig fwdError(String page)
page -
public ActionConfig ajaxOk(AjaxRenderer renderer)
renderer -
public ActionConfig ajaxError(AjaxRenderer renderer)
renderer -
public ActionConfig redirOk(String page)
page -
public ActionConfig redirError(String page)
page -
public ActionConfig redirOk()
public ActionConfig redirError()
public ActionConfig redirOk(String page,
boolean flag)
page - flag -
public ActionConfig redirError(String page,
boolean flag)
page - flag -
public ActionConfig chainOk(ActionConfig actionConfig)
actionConfig -
public ActionConfig chainError(ActionConfig actionConfig)
actionConfig -
public ActionConfig addFilter(List filters,
String innerAction)
filters - A list of filtersinnerAction - the inner action
public ActionConfig addFilter(Filter filter,
String... args)
filter - The filter to addargs - The list of inner actions
public ActionConfig filter(Filter filter,
String... args)
filter - args -
public ActionConfig filter(List filters,
String innerAction)
filters - innerAction -
public List<Filter> getFilters()
public List<Filter> getFilters(String innerAction)
innerAction - the inner action.
public List<Filter> getFirstFilters(String innerAction)
innerAction - the inner action.
public String getName()
public String getInnerAction()
public Consequence getConsequence(String result)
result - The result for what to get the consequence
public Consequence getConsequence(String result,
String innerAction)
result - The result for what to get the consequenceinnerAction - The innerAction from where to get the consequence.
public Consequence getAutoConsequence(String result,
String innerAction)
public Action getAction()
public Class<? extends Object> getActionClass()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||