org.strutsme.wishlist.presentation.struts.base
Class BaseAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.strutsme.wishlist.presentation.struts.base.BaseAction
Direct Known Subclasses:
DeleteWishAction, ListWishesAction, LoginAction, LogOffAction, SaveWishAction, ToLoginPageAction, ViewWishAction

public class BaseAction
extends org.apache.struts.action.Action

Base action for the wishlist.

Author:
Michael Albrecht (mail@michael-albrecht.de)

Field Summary
protected static java.lang.String HAS_FAILED
          Forward, if the action has failed.
protected static java.lang.String HAS_SUCCEEDED
          Forward, if the action has done the work successfull.
protected static java.lang.String IS_CANCELLED
          Forward, if the action is cancelled.
protected static java.lang.String USER_IN_SESSION
          Session-attribute for user.
protected static java.lang.String USER_IS_NOT_AUTHORIZED
          Forward, if the user is not logged in.
 
Fields inherited from class org.apache.struts.action.Action
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
BaseAction()
           
 
Method Summary
protected  boolean checkUser(javax.servlet.http.HttpServletRequest request)
          Checks, if a user is logged in.
protected  UserDto getUser(javax.servlet.http.HttpServletRequest request)
          Returns the user from session.
 
Methods inherited from class org.apache.struts.action.Action
execute, execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_IN_SESSION

protected static final java.lang.String USER_IN_SESSION
Session-attribute for user.

See Also:
Constant Field Values

USER_IS_NOT_AUTHORIZED

protected static final java.lang.String USER_IS_NOT_AUTHORIZED
Forward, if the user is not logged in.

See Also:
Constant Field Values

HAS_SUCCEEDED

protected static final java.lang.String HAS_SUCCEEDED
Forward, if the action has done the work successfull.

See Also:
Constant Field Values

IS_CANCELLED

protected static final java.lang.String IS_CANCELLED
Forward, if the action is cancelled.

See Also:
Constant Field Values

HAS_FAILED

protected static final java.lang.String HAS_FAILED
Forward, if the action has failed.

See Also:
Constant Field Values
Constructor Detail

BaseAction

public BaseAction()
Method Detail

checkUser

protected final boolean checkUser(javax.servlet.http.HttpServletRequest request)
Checks, if a user is logged in.

Parameters:
request - the HttpRequest
Returns:
if user is logged in.

getUser

protected final UserDto getUser(javax.servlet.http.HttpServletRequest request)
Returns the user from session.

Parameters:
request - the httprequest
Returns:
user from session.