org.mentawai.core
Interface Action

All Known Subinterfaces:
StickyAction
All Known Implementing Classes:
BaseAction, BaseAjaxtagAction, BaseLoginAction, LogoutAction, MockAction, PojoAction, ProtectedBaseAction, RubyAction, SingleInstanceBaseAction, SuccessAction

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.

Author:
Sergio Oliveira

Field Summary
static java.lang.String ALREADY
           
static java.lang.String BLOCKED
           
static java.lang.String CREATED
           
static java.lang.String ERROR
          The action execution generated an error.
static java.lang.String INDEX
           
static java.lang.String JSP
           
static java.lang.String LIST
           
static java.lang.String MAIN
           
static java.lang.String NULL
           
static java.lang.String REMOVED
           
static java.lang.String SHOW
           
static java.lang.String SUCCESS
          The action execution was successful.
static java.lang.String TEST
           
static java.lang.String UPDATED
           
 
Method Summary
 Context getApplication()
          Gets this action application context.
 Context getCookies()
          Gets the cookie context for this action.
 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 setCookies(Context context)
          Sets the cookie 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

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

See Also:
Constant Field Values

ERROR

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

See Also:
Constant Field Values

SHOW

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

LIST

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

INDEX

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

MAIN

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

TEST

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

JSP

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

NULL

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

CREATED

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

UPDATED

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

REMOVED

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

ALREADY

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

BLOCKED

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

setInput

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

Parameters:
input - the input to be set

setOutput

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

Parameters:
output - the output to be set

setSession

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

Parameters:
context - The context to be set

setApplication

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

Parameters:
context - The context to be set

setCookies

void setCookies(Context context)
Sets the cookie context for this action.

Parameters:
context - The cookie context to be set

setLocale

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

Parameters:
loc - The user locale to set.

getInput

Input getInput()
Gets the action input.

Returns:
The action input

getOutput

Output getOutput()
Gets the action output.

Returns:
The action output

getSession

Context getSession()
Gets this action session context.

Returns:
The session context

getApplication

Context getApplication()
Gets this action application context.

Returns:
The application context

getCookies

Context getCookies()
Gets the cookie context for this action.

Returns:
The cookie context
Since:
1.2

getLocale

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

Returns:
The user locale
Since:
1.2


Copyright © 2005 Mentawai Team. All Rights Reserved.