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

Quick Search    Search Deep

org.mentawai.core
Interface Action  view Action download Action.java

All Known Implementing Classes:
BaseAction

public interface Action

Describes a Mentawai action, the central idea of the framework architecture. An action has an input (org.mentawai.core.Input) and an output (org.mentawai.core.Output). An action generates a result (java.lang.String) after it is executed. The result is usually SUCCESS or ERROR. For each result there is a consequence (org.mentawai.core.Consequence). The consequences for a web application are usually FORWARD or REDIRECT. An action has access to contexts (org.mentawai.core.Context). The contexts for a web application are usually a SessionContext or a ApplicationContext.


Field Summary
static java.lang.String ERROR
          The action execution generated an error.
static java.lang.String SUCCESS
          The action execution was successful.
 
Method Summary
 java.lang.String execute()
          Executes the action, returning a result.
 Context getApplication()
          Gets this action application context.
 Input getInput()
          Gets the action input.
 java.util.Locale getLocale()
          Gets the use locale for this action.
 Output getOutput()
          Gets the action output.
 Context getSession()
          Gets this action session context.
 void setApplication(Context context)
          Sets the application context for this action.
 void setInput(Input input)
          Sets the input for this action.
 void setLocale(java.util.Locale loc)
          Sets the user locale for this action.
 void setOutput(Output output)
          Sets the output for this action.
 void setSession(Context context)
          Sets the session context for this action.
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
The action execution was successful.

See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
The action execution generated an error.

See Also:
Constant Field Values
Method Detail

execute

public java.lang.String execute()
                         throws java.lang.Exception
Executes the action, returning a result.


setInput

public void setInput(Input input)
Sets the input for this action.


setOutput

public void setOutput(Output output)
Sets the output for this action.


setSession

public void setSession(Context context)
Sets the session context for this action.


setApplication

public void setApplication(Context context)
Sets the application context for this action.


setLocale

public void setLocale(java.util.Locale loc)
Sets the user locale for this action.


getInput

public Input getInput()
Gets the action input.


getOutput

public Output getOutput()
Gets the action output.


getSession

public Context getSession()
Gets this action session context.


getApplication

public Context getApplication()
Gets this action application context.


getLocale

public java.util.Locale getLocale()
Gets the use locale for this action.