fr.paris.lutece.portal.web.pluginaction
Interface IPluginAction<FieldsDTO>

Type Parameters:
FieldsDTO - the dto used by the process method, might be session variables or any useful data for the action processing.
All Known Implementing Classes:
AbstractPluginAction

public interface IPluginAction<FieldsDTO>

A plugin Action.
The action should rely on a service instead of implementing the business rules itself if possible.


Method Summary
 void fillModel(javax.servlet.http.HttpServletRequest request, AdminUser adminUser, java.util.Map<java.lang.String,java.lang.Object> model)
          Fills the model to provide necessary data to fill the button template
 java.lang.String getButtonTemplate()
          Gets the template to display the action (typically a button - but also check box, select...)
 java.lang.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

isInvoked

boolean isInvoked(javax.servlet.http.HttpServletRequest request)
Returns true if the action is invoked, false otherwise.
Uses one or several button names to detect if the action is called or note.

Parameters:
request - the request
Returns:
true if the action is invoked, false otherwise.

process

IPluginActionResult process(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            AdminUser adminUser,
                            FieldsDTO sessionFields)
                            throws AccessDeniedException
Processes the request

Parameters:
request - the request
response - the response
adminUser - the user
sessionFields - the session fields
Returns:
the action result
Throws:
AccessDeniedException - if the user can't access the feature

fillModel

void fillModel(javax.servlet.http.HttpServletRequest request,
               AdminUser adminUser,
               java.util.Map<java.lang.String,java.lang.Object> model)
Fills the model to provide necessary data to fill the button template

Parameters:
request - the request
adminUser - the admin user to filter features
model - the model

getButtonTemplate

java.lang.String getButtonTemplate()
Gets the template to display the action (typically a button - but also check box, select...) Return an empty strict if no display is needed (for default directory actions : create, search...)

Returns:
the template

getName

java.lang.String getName()
The action name

Returns:
the name


Copyright © 2011 Mairie de Paris. All Rights Reserved.