|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.struts.action.Action
com.jcorporate.expresso.core.controller.Controller
com.jcorporate.expresso.core.controller.DBController
An extension of the basic Controller object that knows how to connect to a database, and how to read it's own security information for each state
| Field Summary |
| Fields inherited from class com.jcorporate.expresso.core.controller.Controller |
CONTROLLER_PARAM_KEY, CTL_SUCC_CTL, CTL_SUCC_STATE, CTL_SUCC_TRAN, mLog, NEWSTATE_EXCEPTION_KEY, ORIGINAL_URL_KEY, REQUEST_KEY, RESPONSE_KEY, RETURN_TO_SENDER_TRAN, STATE_ERR_CTL, STATE_ERR_STATE, STATE_ERR_TRAN, STATE_PARAM_KEY, STATE_SUCC_CTL, STATE_SUCC_STATE, STATE_SUCC_TRAN |
| 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 | |
DBController()
|
|
| Method Summary | |
protected String |
getString(String stringCode,
Object[] args,
ControllerRequest myRequest)
Deprecated. The getString method from ControllerRequest should be used in *all* cases - this method is not reliable, as the same DBController instance is shared between users. |
static boolean |
isAllowed(ControllerRequest request,
DBController controller,
String newState)
for the given controller class and state, can the user in this request access this state? |
boolean |
stateAllowed(String newState,
ControllerRequest myRequest)
For database controllers, we check if the new state is allowed against the database objects for that purpose |
| Methods inherited from class org.apache.struts.action.Action |
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 |
| Constructor Detail |
public DBController()
| Method Detail |
public boolean stateAllowed(String newState,
ControllerRequest myRequest)
throws ControllerException
stateAllowed in class ControllernewState - The name of the new state that is being requested; controller class is assumed to be 'this'myRequest - the ControllerRequest object
ControllerException - if another undefined error takes place while
checking security.
public static boolean isAllowed(ControllerRequest request,
DBController controller,
String newState)
throws DBException,
CacheException
request - current requestcontroller - controller in questionnewState - state in question
DBException - upon database error
CacheException - upon error working with the cache system.
protected String getString(String stringCode,
Object[] args,
ControllerRequest myRequest)
stringCode - The code in the MessagesBundle to retrieveargs - the i18n formatting argumentsmyRequest - the controllerRequest object
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||