| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
package org.kuali.student.r2.lum.course.dto; |
| 12 | |
|
| 13 | |
import java.io.Serializable; |
| 14 | |
import java.util.ArrayList; |
| 15 | |
import java.util.List; |
| 16 | |
|
| 17 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 18 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 19 | |
import javax.xml.bind.annotation.XmlAnyElement; |
| 20 | |
import javax.xml.bind.annotation.XmlType; |
| 21 | |
|
| 22 | |
import javax.xml.bind.annotation.XmlElement; |
| 23 | |
|
| 24 | |
import org.kuali.student.r2.common.dto.AmountInfo; |
| 25 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
| 26 | |
import org.kuali.student.r2.common.dto.TimeAmountInfo; |
| 27 | |
import org.kuali.student.r2.lum.course.infc.Activity; |
| 28 | |
import org.w3c.dom.Element; |
| 29 | |
|
| 30 | 0 | @XmlType(name = "ActivityInfo", propOrder = {"id", "typeKey", "stateKey", "name", "descr", "duration", "unitsContentOwner", "defaultEnrollmentEstimate", "contactHours", "meta", "attributes", |
| 31 | |
"_futureElements"}) |
| 32 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 33 | |
public class ActivityInfo extends IdEntityInfo implements Activity, Serializable { |
| 34 | |
|
| 35 | |
private static final long serialVersionUID = 1L; |
| 36 | |
|
| 37 | |
@XmlElement |
| 38 | |
private TimeAmountInfo duration; |
| 39 | |
|
| 40 | |
@XmlElement |
| 41 | |
private List<String> unitsContentOwner; |
| 42 | |
|
| 43 | |
@XmlElement |
| 44 | |
private Integer defaultEnrollmentEstimate; |
| 45 | |
|
| 46 | |
@XmlElement |
| 47 | |
private AmountInfo contactHours; |
| 48 | |
|
| 49 | |
@XmlAnyElement |
| 50 | |
private List<Element> _futureElements; |
| 51 | |
|
| 52 | 0 | public ActivityInfo() {} |
| 53 | |
|
| 54 | |
public ActivityInfo(Activity activity) { |
| 55 | 0 | super(activity); |
| 56 | 0 | if (activity != null) { |
| 57 | 0 | this.duration = new TimeAmountInfo(activity.getDuration()); |
| 58 | 0 | this.unitsContentOwner = new ArrayList<String>(activity.getUnitsContentOwner()); |
| 59 | 0 | this.defaultEnrollmentEstimate = activity.getDefaultEnrollmentEstimate(); |
| 60 | 0 | this.contactHours = new AmountInfo(activity.getContactHours()); |
| 61 | |
} |
| 62 | 0 | } |
| 63 | |
|
| 64 | |
@Override |
| 65 | |
public TimeAmountInfo getDuration() { |
| 66 | 0 | return duration; |
| 67 | |
} |
| 68 | |
|
| 69 | |
public void setDuration(TimeAmountInfo duration) { |
| 70 | 0 | this.duration = duration; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
@Override |
| 74 | |
public List<String> getUnitsContentOwner() { |
| 75 | 0 | if (unitsContentOwner == null) { |
| 76 | 0 | unitsContentOwner = new ArrayList<String>(0); |
| 77 | |
} |
| 78 | 0 | return unitsContentOwner; |
| 79 | |
} |
| 80 | |
|
| 81 | |
public void setUnitsContentOwner(List<String> unitsContentOwner) { |
| 82 | 0 | this.unitsContentOwner = unitsContentOwner; |
| 83 | 0 | } |
| 84 | |
|
| 85 | |
@Override |
| 86 | |
public Integer getDefaultEnrollmentEstimate() { |
| 87 | 0 | return defaultEnrollmentEstimate; |
| 88 | |
} |
| 89 | |
|
| 90 | |
public void setDefaultEnrollmentEstimate(Integer defaultEnrollmentEstimate) { |
| 91 | 0 | this.defaultEnrollmentEstimate = defaultEnrollmentEstimate; |
| 92 | 0 | } |
| 93 | |
|
| 94 | |
public void setContactHours(AmountInfo contactHours) { |
| 95 | 0 | this.contactHours = contactHours; |
| 96 | 0 | } |
| 97 | |
|
| 98 | |
@Override |
| 99 | |
public AmountInfo getContactHours() { |
| 100 | 0 | return contactHours; |
| 101 | |
} |
| 102 | |
|
| 103 | |
} |