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 String ACCESSDENIED
           
static String ADD
           
static String AJAX
           
static String ALREADY
           
static String BACK
           
static String BLOCKED
           
static String CREATED
           
static String EDIT
           
static String ERROR
          The action execution generated an error.
static String EXCEPTION
           
static String HTML
           
static String INDEX
           
static String JSON
           
static String JSP
           
static String LIST
           
static String LOGIN
           
static String MAIN
           
static String NEXT
           
static String NOT_FOUND
           
static String NULL
           
static String REMOVED
           
static String SHOW
           
static String STREAM
           
static String SUCCESS
          The action execution was successful.
static String TEST
           
static String UPDATED
           
static String XML
           
 
Method Summary
 Context getApplication()
          Gets this action application context.
 Context getCookies()
          Gets the cookie context for this action.
 Input getInput()
          Gets the action input.
 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(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 String SUCCESS
The action execution was successful.

See Also:
Constant Field Values

ERROR

static final String ERROR
The action execution generated an error.

See Also:
Constant Field Values

SHOW

static final String SHOW
See Also:
Constant Field Values

LIST

static final String LIST
See Also:
Constant Field Values

INDEX

static final String INDEX
See Also:
Constant Field Values

MAIN

static final String MAIN
See Also:
Constant Field Values

TEST

static final String TEST
See Also:
Constant Field Values

JSP

static final String JSP
See Also:
Constant Field Values

NULL

static final String NULL
See Also:
Constant Field Values

CREATED

static final String CREATED
See Also:
Constant Field Values

UPDATED

static final String UPDATED
See Also:
Constant Field Values

REMOVED

static final String REMOVED
See Also:
Constant Field Values

ALREADY

static final String ALREADY
See Also:
Constant Field Values

BLOCKED

static final String BLOCKED
See Also:
Constant Field Values

XML

static final String XML
See Also:
Constant Field Values

JSON

static final String JSON
See Also:
Constant Field Values

HTML

static final String HTML
See Also:
Constant Field Values

ADD

static final String ADD
See Also:
Constant Field Values

EDIT

static final String EDIT
See Also:
Constant Field Values

NEXT

static final String NEXT
See Also:
Constant Field Values

BACK

static final String BACK
See Also:
Constant Field Values

AJAX

static final String AJAX
See Also:
Constant Field Values

STREAM

static final String STREAM
See Also:
Constant Field Values

ACCESSDENIED

static final String ACCESSDENIED
See Also:
Constant Field Values

LOGIN

static final String LOGIN
See Also:
Constant Field Values

EXCEPTION

static final String EXCEPTION

NOT_FOUND

static final String NOT_FOUND
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(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

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

Returns:
The user locale
Since:
1.2


Copyright © 2013. All Rights Reserved.