1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class1.hold.dto;
18
19 import org.apache.commons.lang.StringUtils;
20 import org.kuali.student.core.person.dto.PersonInfo;
21 import org.kuali.student.enrollment.class1.hold.util.HoldsConstants;
22 import org.kuali.student.r2.core.hold.dto.AppliedHoldInfo;
23 import org.kuali.student.r2.core.hold.dto.HoldIssueInfo;
24
25 import java.io.Serializable;
26 import java.util.ArrayList;
27 import java.util.List;
28
29
30
31
32 public class AppliedHoldMaintenanceWrapper implements Serializable {
33
34
35
36
37 private String action;
38
39
40
41
42 private PersonInfo person;
43
44 private AppliedHoldWrapper maintenanceHold;
45
46 public AppliedHoldMaintenanceWrapper() {
47 super();
48 }
49
50 public String getAction() {
51 return action;
52 }
53
54 public void setAction(String action) {
55 this.action = action;
56 }
57
58 public PersonInfo getPerson() {
59 return person;
60 }
61
62 public void setPerson(PersonInfo person) {
63 this.person = person;
64 }
65
66 public AppliedHoldWrapper getMaintenanceHold() {
67 if (maintenanceHold == null) {
68 maintenanceHold = new AppliedHoldWrapper();
69 }
70 return maintenanceHold;
71 }
72
73 public void setMaintenanceHold(AppliedHoldWrapper maintenanceHold) {
74 this.maintenanceHold = maintenanceHold;
75 }
76
77 public String getHoldCode() {
78 return getMaintenanceHold().getHoldCode();
79 }
80
81 public void setHoldCode(String holdCode) {
82 getMaintenanceHold().setHoldCode(holdCode.toUpperCase());
83 }
84
85 public String getEffectiveTerm() {
86 return getMaintenanceHold().getEffectiveTerm();
87 }
88
89 public void setEffectiveTerm(String effectiveTerm) {
90 getMaintenanceHold().setEffectiveTerm(effectiveTerm);
91 }
92
93 public String getExpirationTerm() {
94 return getMaintenanceHold().getExpirationTerm();
95 }
96
97 public void setExpirationTerm(String expirationTerm) {
98 getMaintenanceHold().setExpirationTerm(expirationTerm);
99 }
100
101 public HoldIssueInfo getHoldIssue() {
102 return getMaintenanceHold().getHoldIssue();
103 }
104
105 public void setHoldIssue(HoldIssueInfo holdIssue) {
106 getMaintenanceHold().setHoldIssue(holdIssue);
107 }
108
109 public AppliedHoldInfo getAppliedHold() {
110 return getMaintenanceHold().getAppliedHold();
111 }
112
113 public void setAppliedHold(AppliedHoldInfo appliedHold) {
114 getMaintenanceHold().setAppliedHold(appliedHold);
115 }
116
117 public String getViewHeaderInfo() {
118
119 if (this.getPerson() != null) {
120 return this.getPerson().getName() + " (" + this.getPerson().getId() + ")";
121 }
122
123 return StringUtils.EMPTY;
124 }
125
126 public String getPageHeaderInfo() {
127
128 if (HoldsConstants.APPLIED_HOLDS_ACTION_APPLY.equals(this.getAction())) {
129 return "Apply Hold";
130 } else if (HoldsConstants.APPLIED_HOLDS_ACTION_EDIT.equals(this.getAction())) {
131 return "Edit Hold";
132 } else if (HoldsConstants.APPLIED_HOLDS_ACTION_EXPIRE.equals(this.getAction())) {
133 return "Expire Hold";
134 } else if (HoldsConstants.APPLIED_HOLDS_ACTION_DELETE.equals(this.getAction())) {
135 return "Delete Hold";
136 } else {
137 return "Maintain Hold";
138 }
139
140 }
141 }