com.atlassian.jira.issue.pager
Class PagerManager

java.lang.Object
  extended by com.atlassian.jira.issue.pager.PagerManager

public class PagerManager
extends Object


Constructor Summary
PagerManager(Map session)
           
 
Method Summary
 void clearPager()
          Removes the pager from the session.
 void clearPagerIfRequired(SearchRequest searchRequest, User user)
          If the search request being run returns different results to the one cached in memory, then clear it.
 NextPreviousPager getPager()
          Returns pager stored in the session or a new pager if pager not found in the session.
 void updatePager(SearchRequest searchRequest, User user)
          Update a pager if the search request passed is different from the searchrequest that is already there.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagerManager

public PagerManager(Map session)
Method Detail

clearPagerIfRequired

public void clearPagerIfRequired(SearchRequest searchRequest,
                                 User user)
If the search request being run returns different results to the one cached in memory, then clear it.

This is useful if you are performing a search, and you need to reset any pager that may be in memory.

Parameters:
searchRequest - search request
user - user

clearPager

public void clearPager()
Removes the pager from the session.


updatePager

public void updatePager(SearchRequest searchRequest,
                        User user)
Update a pager if the search request passed is different from the searchrequest that is already there. It does not check if the results of the search request are different. This is because if you do not want to reset the next previous pager whilst viewing an issue that may have changed to make it outside the current search request.

Parameters:
searchRequest - The current search request in the application
user - The current remote user

getPager

public NextPreviousPager getPager()
Returns pager stored in the session or a new pager if pager not found in the session.

Returns:
pager from session if found, otherwise new pager


Copyright © 2002-2007 Atlassian. All Rights Reserved.