001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.labs.registration.form; 017 018import java.io.Serializable; 019import java.util.ArrayList; 020import java.util.Date; 021import java.util.List; 022 023/** 024 * Class for KS Admin Registration Lab prototype 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public class LabsAdminRegistrationCourse implements Serializable{ 029 030 private static final long serialVersionUID = 5236548204817229477L; 031 private String code; 032 private String section; 033 private String courseName; 034 private Integer credits; 035 private String regOptions; 036 private Date regDate; 037 private Date dropDate; 038 private Date effectiveDate; 039 040 private List<LabsAdminRegistrationActivity> activities; 041 private boolean subterm; 042 043 public LabsAdminRegistrationCourse(){} 044 045 public LabsAdminRegistrationCourse(String code, String section, String courseName, Integer credits, 046 String regOptions, Date regDate) { 047 this.code = code; 048 this.section = section; 049 this.courseName = courseName; 050 this.credits = credits; 051 this.regOptions = regOptions; 052 this.regDate = regDate; 053 this.effectiveDate = regDate; 054 } 055 056 public String getCode() { 057 return code; 058 } 059 060 public void setCode(String code) { 061 this.code = code; 062 } 063 064 public String getSection() { 065 return section; 066 } 067 068 public void setSection(String section) { 069 this.section = section; 070 } 071 072 public String getCourseName() { 073 return courseName; 074 } 075 076 public void setCourseName(String courseName) { 077 this.courseName = courseName; 078 } 079 080 public void setCredits(Integer credits) { 081 this.credits = credits; 082 } 083 084 public Integer getCredits() { 085 return credits; 086 } 087 088 public String getRegOptions() { 089 return regOptions; 090 } 091 092 public void setRegOptions(String regOptions) { 093 this.regOptions = regOptions; 094 } 095 096 public Date getRegDate() { 097 return regDate; 098 } 099 100 public void setRegDate(Date regDate) { 101 this.regDate = regDate; 102 } 103 104 public List<LabsAdminRegistrationActivity> getActivities() { 105 return activities; 106 } 107 108 public void setActivities(List<LabsAdminRegistrationActivity> activities) { 109 this.activities = activities; 110 } 111 112 public List<String> getActivityTypes(){ 113 ArrayList<String> list = new ArrayList<String>(); 114 for (LabsAdminRegistrationActivity activity: activities) { 115 list.add(activity.getType()); 116 } 117 118 return list; 119 } 120 121 public List<String> getActivityDateTimes(){ 122 ArrayList<String> list = new ArrayList<String>(); 123 for (LabsAdminRegistrationActivity activity: activities) { 124 list.add(activity.getDateTime()); 125 } 126 127 return list; 128 } 129 130 public List<String> getActivityInstructors(){ 131 ArrayList<String> list = new ArrayList<String>(); 132 for (LabsAdminRegistrationActivity activity: activities) { 133 list.add(activity.getInstructor()); 134 } 135 136 return list; 137 } 138 139 public List<String> getActivityRooms(){ 140 ArrayList<String> list = new ArrayList<String>(); 141 for (LabsAdminRegistrationActivity activity: activities) { 142 list.add(activity.getRoom()); 143 } 144 145 return list; 146 } 147 148 public List<String> getActivityTypeDateTimes() { 149 ArrayList<String> list = new ArrayList<String>(); 150 for (LabsAdminRegistrationActivity activity: activities) { 151 list.add(activity.getType() + " " + activity.getDateTime()); 152 } 153 154 return list; 155 } 156 157 public Date getDropDate() { 158 return dropDate; 159 } 160 161 public void setDropDate(Date dropDate) { 162 this.dropDate = dropDate; 163 } 164 165 public Date getEffectiveDate() { 166 return effectiveDate; 167 } 168 169 public void setEffectiveDate(Date effectiveDate) { 170 this.effectiveDate = effectiveDate; 171 } 172 173 public boolean isSubterm() { 174 return subterm; 175 } 176 177 public void setSubterm(boolean subterm) { 178 this.subterm = subterm; 179 } 180}