1 package org.kuali.student.enrollment.class2.courseoffering.dto;
2
3 import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingClusterInfo;
4
5 import java.io.Serializable;
6 import java.util.ArrayList;
7 import java.util.List;
8
9 public class ActivityOfferingClusterWrapper implements Serializable {
10 public static final String RG_MESSAGE_PARTIAL = "uif-rg-message-partial";
11 public static final String RG_MESSAGE_ALL = "uif-rg-message-all";
12 public static final String RG_MESSAGE_NONE = "uif-rg-message-none";
13
14 private String activityOfferingClusterId;
15 private ActivityOfferingClusterInfo aoCluster;
16 private List<RegistrationGroupWrapper> rgWrapperList;
17 private List<ActivityOfferingWrapper> aoWrapperList;
18 private String rgStatus = "";
19 private String rgMessageStyle = "";
20 private String clusterNameForDisplay = "";
21 private String formatNameForDisplay ="";
22
23 private String formatOfferingId;
24
25
26
27
28
29
30
31
32
33
34
35
36
37 private boolean hasAllRegGroups;
38
39 public ActivityOfferingClusterWrapper() {
40 rgWrapperList = new ArrayList<RegistrationGroupWrapper>();
41 aoWrapperList = new ArrayList<ActivityOfferingWrapper>();
42 hasAllRegGroups = false;
43 rgStatus = "No Registration Groups Generated";
44 rgMessageStyle = RG_MESSAGE_NONE;
45 clusterNameForDisplay = "";
46 }
47
48 public ActivityOfferingClusterWrapper(String activityOfferingClusterId, List<RegistrationGroupWrapper> rgWrapperList){
49 this.activityOfferingClusterId = activityOfferingClusterId;
50 this.rgWrapperList = rgWrapperList;
51 if (rgWrapperList.isEmpty()) {
52 hasAllRegGroups = false;
53 rgStatus = "No Registration Groups Generated";
54 rgMessageStyle = RG_MESSAGE_NONE;
55 }
56 }
57
58 public String getActivityOfferingClusterId() {
59 return activityOfferingClusterId;
60 }
61
62 public void setActivityOfferingClusterId(String activityOfferingClusterId) {
63 this.activityOfferingClusterId = activityOfferingClusterId;
64 }
65
66 public ActivityOfferingClusterInfo getAoCluster() {
67 return aoCluster;
68 }
69
70 public void setAoCluster(ActivityOfferingClusterInfo aoCluster) {
71 this.aoCluster = aoCluster;
72 }
73
74 public List<RegistrationGroupWrapper> getRgWrapperList() {
75 return rgWrapperList;
76 }
77
78 public void setRgWrapperList(List<RegistrationGroupWrapper> rgWrapperList) {
79 this.rgWrapperList = rgWrapperList;
80 if (rgWrapperList.isEmpty()) {
81 hasAllRegGroups = false;
82 rgStatus = "No Registration Groups Generated";
83 rgMessageStyle = RG_MESSAGE_NONE;
84 }
85 }
86
87 public List<ActivityOfferingWrapper> getAoWrapperList() {
88 return aoWrapperList;
89 }
90
91 public void setAoWrapperList(List<ActivityOfferingWrapper> aoWrapperList) {
92 this.aoWrapperList = aoWrapperList;
93 }
94
95 public String getRgStatus() {
96 return rgStatus;
97 }
98
99 public void setRgStatus(String rgStatus) {
100 this.rgStatus = rgStatus;
101 }
102
103 public String getRgMessageStyle() {
104 return rgMessageStyle;
105 }
106
107 public void setRgMessageStyle(String rgMessageStyle) {
108 this.rgMessageStyle = rgMessageStyle;
109 }
110
111 public boolean isHasAllRegGroups() {
112 return hasAllRegGroups;
113 }
114
115 public void setHasAllRegGroups(boolean hasAllRegGroups) {
116 this.hasAllRegGroups = hasAllRegGroups;
117 }
118
119 public String getClusterNameForDisplay() {
120 return clusterNameForDisplay;
121 }
122
123 public void setClusterNameForDisplay(String clusterNameForDisplay) {
124 if(aoCluster == null){
125 this.clusterNameForDisplay = clusterNameForDisplay;
126 }
127 else {
128 String pubName=aoCluster.getName();
129 if (pubName != null && !pubName.isEmpty()) {
130 this.clusterNameForDisplay = "Cluster: "+aoCluster.getPrivateName()+" ("+pubName+")";
131 }
132 else{
133 this.clusterNameForDisplay = "Cluster: "+aoCluster.getPrivateName();
134 }
135 }
136 }
137
138 public String getFormatNameForDisplay() {
139 return formatNameForDisplay;
140 }
141
142 public void setFormatNameForDisplay(String formatNameForDisplay) {
143 this.formatNameForDisplay = formatNameForDisplay;
144 }
145
146 public String getFormatOfferingId() {
147 return formatOfferingId;
148 }
149
150 public void setFormatOfferingId(String formatOfferingId) {
151 this.formatOfferingId = formatOfferingId;
152 }
153 }