| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
package org.kuali.student.r2.core.statement.dto; |
| 16 | |
|
| 17 | |
import org.kuali.student.r2.common.dto.IdNamelessEntityInfo; |
| 18 | |
import org.kuali.student.r2.core.statement.infc.ReqCompField; |
| 19 | |
import org.kuali.student.r2.core.statement.infc.ReqComponent; |
| 20 | |
import org.w3c.dom.Element; |
| 21 | |
|
| 22 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 24 | |
import javax.xml.bind.annotation.XmlAnyElement; |
| 25 | |
import javax.xml.bind.annotation.XmlAttribute; |
| 26 | |
import javax.xml.bind.annotation.XmlElement; |
| 27 | |
import javax.xml.bind.annotation.XmlType; |
| 28 | |
import java.io.Serializable; |
| 29 | |
import java.util.ArrayList; |
| 30 | |
import java.util.Date; |
| 31 | |
import java.util.List; |
| 32 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 38 | |
@XmlType(name = "ReqComponentInfo", propOrder = {"id", |
| 39 | |
"typeKey", |
| 40 | |
"stateKey", |
| 41 | |
"descr", |
| 42 | |
"reqCompFields", |
| 43 | |
"naturalLanguageTranslation", |
| 44 | |
"effectiveDate", |
| 45 | |
"expirationDate", |
| 46 | |
"meta", |
| 47 | |
"attributes", |
| 48 | |
"_futureElements"}) |
| 49 | |
public class ReqComponentInfo extends IdNamelessEntityInfo implements ReqComponent, Serializable { |
| 50 | |
|
| 51 | |
private static final long serialVersionUID = 1L; |
| 52 | |
@XmlElement |
| 53 | |
private List<ReqCompFieldInfo> reqCompFields; |
| 54 | |
@XmlElement |
| 55 | |
private RichTextInfo descr; |
| 56 | |
@XmlAttribute |
| 57 | |
private String naturalLanguageTranslation; |
| 58 | |
@XmlElement |
| 59 | |
private Date effectiveDate; |
| 60 | |
@XmlElement |
| 61 | |
private Date expirationDate; |
| 62 | |
@XmlAnyElement |
| 63 | |
private List<Element> _futureElements; |
| 64 | |
|
| 65 | 0 | public ReqComponentInfo() { |
| 66 | 0 | } |
| 67 | |
|
| 68 | |
public ReqComponentInfo(ReqComponent input) { |
| 69 | 0 | super(input); |
| 70 | 0 | if (null != input) { |
| 71 | 0 | this.reqCompFields = new ArrayList<ReqCompFieldInfo>(); |
| 72 | 0 | for (ReqCompField reqCompField : input.getReqCompFields()) { |
| 73 | 0 | this.reqCompFields.add(new ReqCompFieldInfo(reqCompField)); |
| 74 | |
} |
| 75 | 0 | if (input.getDescr() != null) { |
| 76 | 0 | this.descr = new RichTextInfo(input.getDescr()); |
| 77 | |
} |
| 78 | 0 | this.effectiveDate = (null != input.getEffectiveDate()) ? new Date(input.getEffectiveDate().getTime()) : null; |
| 79 | 0 | this.expirationDate = (null != input.getExpirationDate()) ? new Date(input.getExpirationDate().getTime()) : null; |
| 80 | 0 | this.naturalLanguageTranslation = input.getNaturalLanguageTranslation(); |
| 81 | |
} |
| 82 | 0 | } |
| 83 | |
|
| 84 | |
@Override |
| 85 | |
public List<ReqCompFieldInfo> getReqCompFields() { |
| 86 | 0 | if (null == reqCompFields) { |
| 87 | 0 | reqCompFields = new ArrayList<ReqCompFieldInfo>(); |
| 88 | |
} |
| 89 | 0 | return this.reqCompFields; |
| 90 | |
} |
| 91 | |
|
| 92 | |
public void setReqCompFields(List<ReqCompFieldInfo> reqCompFields) { |
| 93 | 0 | this.reqCompFields = reqCompFields; |
| 94 | 0 | } |
| 95 | |
|
| 96 | |
@Override |
| 97 | |
public Date getEffectiveDate() { |
| 98 | 0 | return this.effectiveDate; |
| 99 | |
} |
| 100 | |
|
| 101 | |
public void setEffectiveDate(Date effectiveDate) { |
| 102 | 0 | this.effectiveDate = effectiveDate; |
| 103 | 0 | } |
| 104 | |
|
| 105 | |
@Override |
| 106 | |
public Date getExpirationDate() { |
| 107 | 0 | return this.expirationDate; |
| 108 | |
} |
| 109 | |
|
| 110 | |
public void setExpirationDate(Date expirationDate) { |
| 111 | 0 | this.expirationDate = expirationDate; |
| 112 | 0 | } |
| 113 | |
|
| 114 | |
@Override |
| 115 | |
public RichTextInfo getDescr() { |
| 116 | 0 | return descr; |
| 117 | |
} |
| 118 | |
|
| 119 | |
public void setDescr(RichTextInfo descr) { |
| 120 | 0 | this.descr = descr; |
| 121 | 0 | } |
| 122 | |
|
| 123 | |
@Override |
| 124 | |
public String getNaturalLanguageTranslation() { |
| 125 | 0 | return this.naturalLanguageTranslation; |
| 126 | |
} |
| 127 | |
|
| 128 | |
public void setNaturalLanguageTranslation(String naturalLanguageTranslation) { |
| 129 | 0 | this.naturalLanguageTranslation = naturalLanguageTranslation; |
| 130 | 0 | } |
| 131 | |
} |