|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
FieldsDTO
- the dto used by the process method, might be session variables or any useful data for the action processing.public interface IPluginAction<FieldsDTO>
A plugin Action.
The action should rely on a service instead of implementing the business rules itself if possible.
fillModel(HttpServletRequest, AdminUser, Map)
is called by the JspBean to add additionnal data in the main model
getButtonTemplate()
is used to display buttons.
isInvoked(HttpServletRequest)
is used by a JspBean to detect the invoked action.
#process(HttpServletRequest, HttpServletResponse, AdminUser, IPluginActionFields)
is called by the JspBean to process the invoked action.
The IPluginActionResult
may contain html content or a redirect url or a noop as a result of the action processing.
getName()
is mainly for debbuging purpose
Method Summary | |
---|---|
void |
fillModel(javax.servlet.http.HttpServletRequest request,
AdminUser adminUser,
Map<String,Object> model)
Fills the model to provide necessary data to fill the button template |
String |
getButtonTemplate()
Gets the template to display the action (typically a button - but also check box, select...) |
String |
getName()
The action name |
boolean |
isInvoked(javax.servlet.http.HttpServletRequest request)
Returns true if the action is invoked, false otherwise. |
IPluginActionResult |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AdminUser adminUser,
FieldsDTO sessionFields)
Processes the request |
Method Detail |
---|
boolean isInvoked(javax.servlet.http.HttpServletRequest request)
true
if the action is invoked, false
otherwise.
request
- the request
true
if the action is invoked, false
otherwise.IPluginActionResult process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AdminUser adminUser, FieldsDTO sessionFields) throws AccessDeniedException
request
- the requestresponse
- the responseadminUser
- the usersessionFields
- the session fields
AccessDeniedException
- if the user can't access the featurevoid fillModel(javax.servlet.http.HttpServletRequest request, AdminUser adminUser, Map<String,Object> model)
request
- the requestadminUser
- the admin user to filter featuresmodel
- the modelString getButtonTemplate()
String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |