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