1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.exception;
17
18 import java.util.Properties;
19
20 import org.kuali.rice.core.api.exception.KualiException;
21
22
23
24 public class CashDrawerStateException extends KualiException {
25 private final String campusCode;
26 private final String controllingDocumentId;
27 private final String currentDrawerStatus;
28 private final String desiredDrawerStatus;
29
30 private final static String CASH_DRAWER_STATE_EXCEPTION_SESSION_KEY = "CASH_DRAWER_STATE_EXCEPTION";
31
32
33 public CashDrawerStateException(String campusCode, String controllingDocumentId, String currentDrawerStatus, String desiredDrawerStatus) {
34 super("Cash Drawer State Exception; this exception should simply serve to redirect the page to the Cash Drawer Status page");
35 this.campusCode = campusCode;
36 this.controllingDocumentId = controllingDocumentId;
37 this.currentDrawerStatus = currentDrawerStatus;
38 this.desiredDrawerStatus = desiredDrawerStatus;
39 }
40
41
42
43
44
45 public String getCampusCode() {
46 return campusCode;
47 }
48
49
50
51
52 public String getCurrentDrawerStatus() {
53 return currentDrawerStatus;
54 }
55
56
57
58
59 public String getDesiredDrawerStatus() {
60 return desiredDrawerStatus;
61 }
62
63
64
65
66 public String getControllingDocumentId() {
67 return controllingDocumentId;
68 }
69
70
71
72
73
74 public Properties toProperties() {
75 Properties properties = new Properties();
76 properties.setProperty("verificationUnit", getCampusCode());
77 properties.setProperty("controllingDocumentId", getControllingDocumentId());
78 properties.setProperty("currentDrawerStatus", getCurrentDrawerStatus());
79 properties.setProperty("desiredDrawerStatus", getDesiredDrawerStatus());
80 properties.setProperty("methodToCall", "displayPage");
81 return properties;
82 }
83 }