1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.routelog.web; |
17 | |
|
18 | |
import org.kuali.rice.core.api.config.property.ConfigContext; |
19 | |
import org.kuali.rice.kew.actionrequest.ActionRequestValue; |
20 | |
import org.kuali.rice.kns.web.struts.form.KualiForm; |
21 | |
import org.kuali.rice.krad.util.UrlFactory; |
22 | |
|
23 | |
import java.util.ArrayList; |
24 | |
import java.util.List; |
25 | |
import java.util.Properties; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | 0 | public class RouteLogForm extends KualiForm { |
34 | |
|
35 | |
private static final long serialVersionUID = -3997667167734868281L; |
36 | 0 | private String methodToCall = ""; |
37 | |
private String documentId; |
38 | 0 | private List rootRequests = new ArrayList(); |
39 | |
private int pendingActionRequestCount; |
40 | 0 | private List<ActionRequestValue> futureRootRequests = new ArrayList<ActionRequestValue>(); |
41 | |
private int futureActionRequestCount; |
42 | |
private boolean showFuture; |
43 | |
private String showFutureError; |
44 | |
private boolean removeHeader; |
45 | |
private boolean lookFuture; |
46 | |
private boolean showNotes; |
47 | |
private String docId; |
48 | 0 | private String returnUrlLocation = null; |
49 | 0 | private boolean showCloseButton = false; |
50 | |
private String newRouteLogActionMessage; |
51 | 0 | private boolean enableLogAction = false; |
52 | |
|
53 | |
public boolean isShowCloseButton() { |
54 | 0 | return showCloseButton; |
55 | |
} |
56 | |
public void setShowCloseButton(boolean showCloseButton) { |
57 | 0 | this.showCloseButton = showCloseButton; |
58 | 0 | } |
59 | |
public String getReturnUrlLocation() { |
60 | 0 | return returnUrlLocation; |
61 | |
} |
62 | |
public void setReturnUrlLocation(String returnUrlLocation) { |
63 | 0 | this.returnUrlLocation = returnUrlLocation; |
64 | 0 | } |
65 | |
public String getDocId() { |
66 | 0 | return docId; |
67 | |
} |
68 | |
public void setDocId(String docId) { |
69 | 0 | this.docId = docId; |
70 | 0 | } |
71 | |
public boolean isShowFutureHasError() { |
72 | 0 | return !org.apache.commons.lang.StringUtils.isEmpty(getShowFutureError()); |
73 | |
} |
74 | |
public String getShowFutureError() { |
75 | 0 | return showFutureError; |
76 | |
} |
77 | |
public void setShowFutureError(String showFutureError) { |
78 | 0 | this.showFutureError = showFutureError; |
79 | 0 | } |
80 | |
public boolean isShowFuture() { |
81 | 0 | return showFuture; |
82 | |
} |
83 | |
public void setShowFuture(boolean showReportURL) { |
84 | 0 | this.showFuture = showReportURL; |
85 | 0 | } |
86 | |
public String getMethodToCall() { |
87 | 0 | return methodToCall; |
88 | |
} |
89 | |
public void setMethodToCall(String methodToCall) { |
90 | 0 | this.methodToCall = methodToCall; |
91 | 0 | } |
92 | |
public String getDocumentId() { |
93 | 0 | return documentId; |
94 | |
} |
95 | |
public void setDocumentId(String documentId) { |
96 | 0 | this.documentId = documentId; |
97 | 0 | } |
98 | |
|
99 | |
public int getPendingActionRequestCount() { |
100 | 0 | return pendingActionRequestCount; |
101 | |
} |
102 | |
|
103 | |
public void setPendingActionRequestCount(int pendingActionRequestCount) { |
104 | 0 | this.pendingActionRequestCount = pendingActionRequestCount; |
105 | 0 | } |
106 | |
|
107 | |
public List getRootRequests() { |
108 | 0 | return rootRequests; |
109 | |
} |
110 | |
public void setRootRequests(List rootRequests) { |
111 | 0 | this.rootRequests = rootRequests; |
112 | 0 | } |
113 | |
public int getFutureActionRequestCount() { |
114 | 0 | return futureActionRequestCount; |
115 | |
} |
116 | |
public void setFutureActionRequestCount(int futureActionRequestCount) { |
117 | 0 | this.futureActionRequestCount = futureActionRequestCount; |
118 | 0 | } |
119 | |
public List getFutureRootRequests() { |
120 | 0 | return futureRootRequests; |
121 | |
} |
122 | |
public void setFutureRootRequests(List futureRootRequests) { |
123 | 0 | this.futureRootRequests = futureRootRequests; |
124 | 0 | } |
125 | |
public boolean isRemoveHeader() { |
126 | 0 | return removeHeader; |
127 | |
} |
128 | |
public void setRemoveHeader(boolean removeBar) { |
129 | 0 | this.removeHeader = removeBar; |
130 | 0 | } |
131 | |
public boolean isLookFuture() { |
132 | 0 | return lookFuture; |
133 | |
} |
134 | |
public void setLookFuture(boolean showFutureLink) { |
135 | 0 | this.lookFuture = showFutureLink; |
136 | 0 | } |
137 | |
public boolean isShowNotes() { |
138 | 0 | return showNotes; |
139 | |
} |
140 | |
public void setShowNotes(boolean showNotes) { |
141 | 0 | this.showNotes = showNotes; |
142 | 0 | } |
143 | |
|
144 | |
public String getNewRouteLogActionMessage() { |
145 | 0 | return this.newRouteLogActionMessage; |
146 | |
} |
147 | |
|
148 | |
public void setNewRouteLogActionMessage(String newRouteLogActionMessage) { |
149 | 0 | this.newRouteLogActionMessage = newRouteLogActionMessage; |
150 | 0 | } |
151 | |
|
152 | |
public boolean isEnableLogAction() { |
153 | 0 | return this.enableLogAction; |
154 | |
} |
155 | |
|
156 | |
public void setEnableLogAction(boolean enableLogAction) { |
157 | 0 | this.enableLogAction = enableLogAction; |
158 | 0 | } |
159 | |
|
160 | |
public String getHeaderMenuBar() { |
161 | 0 | Properties parameters = new Properties(); |
162 | 0 | parameters.put("showFuture", isShowFuture()); |
163 | 0 | parameters.put("showNotes", isShowNotes()); |
164 | 0 | if (getDocumentId() != null) { |
165 | 0 | parameters.put("documentId", getDocumentId()); |
166 | |
} |
167 | 0 | if (getDocId() != null) { |
168 | 0 | parameters.put("docId", getDocId()); |
169 | |
} |
170 | 0 | if (getReturnUrlLocation() != null) { |
171 | 0 | parameters.put("backUrl", getReturnUrlLocation()); |
172 | |
} |
173 | 0 | String url = UrlFactory.parameterizeUrl("RouteLog.do", parameters); |
174 | 0 | String krBaseUrl = ConfigContext.getCurrentContextConfig().getKRBaseURL(); |
175 | 0 | url = "<div class=\"lookupcreatenew\" title=\"Refresh\"><a href=\"" + url + "\"><img src=\""+krBaseUrl+"/images/tinybutton-refresh.gif\" alt=\"refresh\"></a></div>"; |
176 | 0 | return url; |
177 | |
} |
178 | |
} |