com.stratelia.silverpeas.peasCore
Class UserAndGroupSelectionProcessor

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.UserAndGroupSelectionProcessor

public class UserAndGroupSelectionProcessor
extends Object

Processor of the selection of some users and user groups with a dedicated form. This processor both prepares the required resources required by the selection form and provides to the selection caller (a component instance) the users and group users that were selected throught the form.


Constructor Summary
UserAndGroupSelectionProcessor()
           
 
Method Summary
 boolean isComeFromSelectionPanel(javax.servlet.http.HttpServletRequest request)
          Is the incoming request comes from the user/group selection panel?
 boolean isSelectionAsked(String destination)
          Is a selection of users or groups is asked by a client (a JSP or request router)?
 boolean isSelectionValidated(javax.servlet.http.HttpServletRequest request)
          Is the selection was validated by the user?
 void prepareSelection(Selection selection, javax.servlet.http.HttpServletRequest request)
          Prepares the specified selection to be carried by the specified HTTP request.
 String processSelection(Selection selection, javax.servlet.http.HttpServletRequest request)
          Processes the specified selection object from the parameters set into the incoming HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAndGroupSelectionProcessor

public UserAndGroupSelectionProcessor()
Method Detail

prepareSelection

public void prepareSelection(Selection selection,
                             javax.servlet.http.HttpServletRequest request)
Prepares the specified selection to be carried by the specified HTTP request.

Parameters:
selection - an object representing the selection that will be done with the user/group selection panel. The users or groups selected by the user will be set into this object.
request - the HTTP request driving the web flow to the user/group selection panel.

processSelection

public String processSelection(Selection selection,
                               javax.servlet.http.HttpServletRequest request)
Processes the specified selection object from the parameters set into the incoming HTTP request.

Parameters:
selection - the object representing the selection done by the user.
request - the HTTP request with the actually selected users and groups.
Returns:
the next destination that is the view or the service that has to use the selection.

isSelectionAsked

public boolean isSelectionAsked(String destination)
Is a selection of users or groups is asked by a client (a JSP or request router)?

Parameters:
destination - the destination of a request processing (a view rendering the response, a service, ...)
Returns:
true if the user panel is asked, false otherwise.

isSelectionValidated

public boolean isSelectionValidated(javax.servlet.http.HttpServletRequest request)
Is the selection was validated by the user? A selection is said validated wether the user pushed the validation button of the selection panel, whatever some users or groups were actually selected.

Parameters:
request - the HTTP request embodied the selection validation event.
Returns:
true if the user validated a selection of users or groups, false if it canceled it.

isComeFromSelectionPanel

public boolean isComeFromSelectionPanel(javax.servlet.http.HttpServletRequest request)
Is the incoming request comes from the user/group selection panel?

Parameters:
request - the incoming HTTP request.
Returns:
true if the request was triggered by the user/group selection panel.


Copyright © 2016 Silverpeas. All Rights Reserved.