F - the dto used by the process method, might be session variables or any useful data for the action processing.public interface IPluginAction<F>
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, Object) 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
| Modifier and Type | Method and Description |
|---|---|
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...) Return an empty string if no display is needed (for default
directory actions : create, search...)
|
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,
F sessionFields)
Processes the request
|
boolean isInvoked(javax.servlet.http.HttpServletRequest request)
true if the action is invoked, false otherwise. request - the requesttrue if the action is invoked, false otherwise.IPluginActionResult process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AdminUser adminUser, F sessionFields) throws AccessDeniedException
request - the requestresponse - the responseadminUser - the usersessionFields - the session fieldsAccessDeniedException - 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()
Copyright © 2020 City of Paris. All rights reserved.