| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
package org.kuali.student.r2.core.proposal.dto; |
| 12 | |
|
| 13 | |
import java.io.Serializable; |
| 14 | |
import java.util.ArrayList; |
| 15 | |
import java.util.Date; |
| 16 | |
import java.util.List; |
| 17 | |
|
| 18 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 19 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 20 | |
import javax.xml.bind.annotation.XmlAnyElement; |
| 21 | |
import javax.xml.bind.annotation.XmlElement; |
| 22 | |
import javax.xml.bind.annotation.XmlType; |
| 23 | |
|
| 24 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
| 25 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
| 26 | |
|
| 27 | |
import org.kuali.student.r2.core.proposal.infc.Proposal; |
| 28 | |
import org.w3c.dom.Element; |
| 29 | |
|
| 30 | 0 | @XmlType(name = "ProposalInfo", propOrder = {"id", |
| 31 | |
"typeKey", |
| 32 | |
"stateKey", |
| 33 | |
"name", |
| 34 | |
"descr", |
| 35 | |
"proposerPerson", |
| 36 | |
"proposerOrg", |
| 37 | |
"proposalReferenceType", |
| 38 | |
"proposalReference", |
| 39 | |
"rationale", |
| 40 | |
"effectiveDate", |
| 41 | |
"expirationDate", |
| 42 | |
"workflowId", |
| 43 | |
"meta", |
| 44 | |
"attributes", |
| 45 | |
"_futureElements"}) |
| 46 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 47 | |
public class ProposalInfo extends IdEntityInfo implements Proposal, Serializable { |
| 48 | |
|
| 49 | |
private static final long serialVersionUID = 1L; |
| 50 | |
@XmlElement |
| 51 | |
private List<String> proposerPerson; |
| 52 | |
@XmlElement |
| 53 | |
private List<String> proposerOrg; |
| 54 | |
@XmlElement |
| 55 | |
private String proposalReferenceType; |
| 56 | |
@XmlElement |
| 57 | |
private List<String> proposalReference; |
| 58 | |
@XmlElement |
| 59 | |
private RichTextInfo rationale; |
| 60 | |
@XmlElement |
| 61 | |
private Date effectiveDate; |
| 62 | |
@XmlElement |
| 63 | |
private Date expirationDate; |
| 64 | |
@XmlElement |
| 65 | |
private String workflowId; |
| 66 | |
@XmlAnyElement |
| 67 | |
private List<Element> _futureElements; |
| 68 | |
|
| 69 | 0 | public ProposalInfo() { |
| 70 | 0 | } |
| 71 | |
|
| 72 | |
public ProposalInfo(Proposal input) { |
| 73 | 0 | super(input); |
| 74 | 0 | if (input != null) { |
| 75 | 0 | if (input.getProposerPerson() != null) { |
| 76 | 0 | this.proposerPerson = new ArrayList<String>(input.getProposerPerson()); |
| 77 | |
} |
| 78 | 0 | if (input.getProposerOrg() != null) { |
| 79 | 0 | this.proposerOrg = new ArrayList<String>(input.getProposerOrg()); |
| 80 | |
} |
| 81 | 0 | this.proposalReferenceType = input.getProposalReferenceType(); |
| 82 | 0 | if (input.getProposalReference() != null) { |
| 83 | 0 | this.proposalReference = new ArrayList<String>(input.getProposalReference()); |
| 84 | |
} |
| 85 | 0 | if (input.getRationale() != null) { |
| 86 | 0 | this.rationale = new RichTextInfo (input.getRationale()); |
| 87 | |
} |
| 88 | 0 | if (input.getEffectiveDate() != null) { |
| 89 | 0 | this.effectiveDate = new Date(input.getEffectiveDate().getTime()); |
| 90 | |
} |
| 91 | 0 | if (input.getExpirationDate() != null) { |
| 92 | 0 | this.expirationDate = new Date(input.getExpirationDate().getTime()); |
| 93 | |
} |
| 94 | 0 | this.workflowId = input.getWorkflowId(); |
| 95 | |
} |
| 96 | |
|
| 97 | 0 | } |
| 98 | |
|
| 99 | |
@Override |
| 100 | |
public List<String> getProposerPerson() { |
| 101 | 0 | if (proposerPerson == null) { |
| 102 | 0 | proposerPerson = new ArrayList<String>(0); |
| 103 | |
} |
| 104 | 0 | return proposerPerson; |
| 105 | |
} |
| 106 | |
|
| 107 | |
public void setProposerPerson(List<String> proposerPerson) { |
| 108 | 0 | this.proposerPerson = proposerPerson; |
| 109 | 0 | } |
| 110 | |
|
| 111 | |
@Override |
| 112 | |
public List<String> getProposerOrg() { |
| 113 | 0 | if (proposerOrg == null) { |
| 114 | 0 | proposerOrg = new ArrayList<String>(0); |
| 115 | |
} |
| 116 | 0 | return proposerOrg; |
| 117 | |
} |
| 118 | |
|
| 119 | |
public void setProposerOrg(List<String> proposerOrg) { |
| 120 | 0 | this.proposerOrg = proposerOrg; |
| 121 | 0 | } |
| 122 | |
|
| 123 | |
@Override |
| 124 | |
public String getProposalReferenceType() { |
| 125 | 0 | return proposalReferenceType; |
| 126 | |
} |
| 127 | |
|
| 128 | |
public void setProposalReferenceType(String proposalReferenceType) { |
| 129 | 0 | this.proposalReferenceType = proposalReferenceType; |
| 130 | 0 | } |
| 131 | |
|
| 132 | |
@Override |
| 133 | |
public List<String> getProposalReference() { |
| 134 | 0 | if (proposalReference == null) { |
| 135 | 0 | proposalReference = new ArrayList<String>(0); |
| 136 | |
} |
| 137 | 0 | return proposalReference; |
| 138 | |
} |
| 139 | |
|
| 140 | |
public void setProposalReference(List<String> proposalReference) { |
| 141 | 0 | this.proposalReference = proposalReference; |
| 142 | 0 | } |
| 143 | |
|
| 144 | |
@Override |
| 145 | |
public RichTextInfo getRationale() { |
| 146 | 0 | return rationale; |
| 147 | |
} |
| 148 | |
|
| 149 | |
public void setRationale(RichTextInfo rationale) { |
| 150 | 0 | this.rationale = rationale; |
| 151 | 0 | } |
| 152 | |
|
| 153 | |
@Override |
| 154 | |
public Date getEffectiveDate() { |
| 155 | 0 | return effectiveDate; |
| 156 | |
} |
| 157 | |
|
| 158 | |
public void setEffectiveDate(Date effectiveDate) { |
| 159 | 0 | this.effectiveDate = effectiveDate; |
| 160 | 0 | } |
| 161 | |
|
| 162 | |
@Override |
| 163 | |
public Date getExpirationDate() { |
| 164 | 0 | return expirationDate; |
| 165 | |
} |
| 166 | |
|
| 167 | |
public void setExpirationDate(Date expirationDate) { |
| 168 | 0 | this.expirationDate = expirationDate; |
| 169 | 0 | } |
| 170 | |
|
| 171 | |
@Override |
| 172 | |
public String getWorkflowId() { |
| 173 | 0 | return workflowId; |
| 174 | |
} |
| 175 | |
|
| 176 | |
public void setWorkflowId(String workflowId) { |
| 177 | 0 | this.workflowId = workflowId; |
| 178 | 0 | } |
| 179 | |
} |