com.jfw.examples
Class PrototypeProjectAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.jfw.web.struts.JFWAction
          extended by com.jfw.examples.PrototypeProjectAction
All Implemented Interfaces:
JFWCommonAction, java.util.Observer

public abstract class PrototypeProjectAction
extends JFWAction


Field Summary
 
Fields inherited from class com.jfw.web.struts.JFWAction
className, LOCALE_KEY
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Fields inherited from interface com.jfw.web.JFWCommonAction
AUTH_MSG_KEY, AUTH_USER_NOT_IN_DB, ERROR_KEY, excludeParams, LOCALE_LANGUAGE_KEY, logger, OPERATION_RESULT_KEY, OPERATION_RESULT_KO_KEY, OPERATION_RESULT_OK_KEY, OPERATION_TYPE_ADD_KEY, OPERATION_TYPE_DELETE_KEY, OPERATION_TYPE_KEY, OPERATION_TYPE_UPDATE_KEY, OUTPUT_DATA_KEY, properties, REQUEST_KEY, RESPONSE_KEY, SERVICE_NAME_KEY, USER_DATA_IN_REQUEST_KEY, USER_PROFILE_IN_REQUEST_KEY
 
Constructor Summary
PrototypeProjectAction()
           
 
Method Summary
protected  boolean isAuthenticated(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.util.HashMap outputData)
          Implements the authentication process.
protected  int isAuthorized(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, UserData userData)
          Implements the authorization process.
 
Methods inherited from class com.jfw.web.struts.JFWAction
afterMyExecute, beforeMyExecute, execute, getLocale, getLocaleLanguage, getUser, initLocale, isSimulateAuthentication, isSimulateAuthorization, myExecute, myInit, security, setLocale, setLocale, setUserDataInOutputData, update
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrototypeProjectAction

public PrototypeProjectAction()
Method Detail

isAuthenticated

protected boolean isAuthenticated(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  java.util.HashMap outputData)
Description copied from class: JFWAction
Implements the authentication process.

Specified by:
isAuthenticated in class JFWAction
Parameters:
request - an HttpServletRequest object.
response - an HttpServletResponse object.
outputData - the HashMap container of data to view in jsp.
Returns:
true if user authentication success, false if fail.

isAuthorized

protected int isAuthorized(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           UserData userData)
Description copied from class: JFWAction
Implements the authorization process.

Specified by:
isAuthorized in class JFWAction
Parameters:
request - an HttpServletRequest object.
response - an HttpServletResponse object.
userData - a UserData object.
Returns:
possible values are:
  1. Authorization.AUTHORIZED_NO: user can not execute the service.
  2. Authorization.AUTHORIZED_YES: user can execute the service.
  3. Authorization.AUTHORIZE_ALL: all users can execute the service.
  4. Authorization.AUTHORIZE_AUTHENTICATED: all authenticated users can execute the service.
  5. Authorization.SERVICE_NOT_FOUND: service name not exist in database.