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.quicklinks;
18:
19: import edu.iu.uis.eden.doctype.DocumentType;
20:
21: /**
22: * Stores statistics about the number of times a particular {@link DocumentType}
23: * appears in a particular user's Action List.
24: *
25: * @author bmcgough
26: */
27: public class ActionListStats implements Comparable {
28:
29: private String documentTypeName;
30: private String documentTypeLabelText;
31: private int count;
32:
33: public ActionListStats(String documentTypeName,
34: String documentTypeLabelText, int count) {
35: this .documentTypeName = documentTypeName;
36: this .documentTypeLabelText = documentTypeLabelText;
37: this .count = count;
38: }
39:
40: public String getDocumentTypeLabelText() {
41: return documentTypeLabelText;
42: }
43:
44: public void setDocumentTypeLabelText(String documentTypeLabelText) {
45: this .documentTypeLabelText = documentTypeLabelText;
46: }
47:
48: public String getDocumentTypeName() {
49: return documentTypeName;
50: }
51:
52: public void setDocumentTypeName(String documentTypeName) {
53: this .documentTypeName = documentTypeName;
54: }
55:
56: public int getCount() {
57: return count;
58: }
59:
60: public void setCount(int count) {
61: this .count = count;
62: }
63:
64: public String getActionListFilterUrl() {
65: return "ActionList.do?method=showRequestFilteredView&docType="
66: + documentTypeName;
67: }
68:
69: public int compareTo(Object obj) {
70: if (obj != null && obj instanceof ActionListStats) {
71: return this .documentTypeLabelText
72: .compareTo(((ActionListStats) obj).documentTypeLabelText);
73: }
74: return 0;
75: }
76: }
|