View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.actionlist;
17  
18  import java.util.List;
19  
20  import org.displaytag.pagination.PaginatedList;
21  import org.displaytag.properties.SortOrderEnum;
22  
23  /**
24   * Implements the display tags paginated list to provide effecient paging for the action list.  
25   * This allows us not to have to fetch an entire action list each time a user pages their list.
26   *
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public class PaginatedActionList implements PaginatedList {
30  
31  	private final List list;
32  	private final int fullListSize;
33  	private final int pageNumber;
34  	private final int objectsPerPage;
35  	private final String searchId;
36  	private final String sortCriterion;
37  	private final SortOrderEnum sortDirection; 
38  	
39  	public PaginatedActionList(List list, int fullListSize, int pageNumber, int objectsPerPage, String searchId, String sortCriterion, SortOrderEnum sortDirection) {
40  		this.list = list;
41  		this.fullListSize = fullListSize;
42  		this.pageNumber = pageNumber;
43  		this.objectsPerPage = objectsPerPage;
44  		this.searchId = searchId;
45  		this.sortCriterion = sortCriterion;
46  		this.sortDirection = sortDirection;
47  	}
48  	
49  	public int getFullListSize() {
50  		return fullListSize;
51  	}
52  
53  	public List getList() {
54  		return list;
55  	}
56  
57  	public int getObjectsPerPage() {
58  		return objectsPerPage;
59  	}
60  
61  	public int getPageNumber() {
62  		return pageNumber;
63  	}
64  
65  	public String getSearchId() {
66  		return searchId;
67  	}
68  
69  	public String getSortCriterion() {
70  		return sortCriterion;
71  	}
72  
73  	public SortOrderEnum getSortDirection() {
74  		return sortDirection;
75  	}
76  	
77  }