| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.common.assembly.data; |
| 17 | |
|
| 18 | |
import java.io.Serializable; |
| 19 | |
import java.util.List; |
| 20 | |
|
| 21 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 22 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 23 | |
import javax.xml.bind.annotation.XmlTransient; |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 30 | 155 | public class ConstraintMetadata implements Serializable { |
| 31 | |
|
| 32 | |
private static final long serialVersionUID = 1L; |
| 33 | |
|
| 34 | |
@XmlTransient |
| 35 | |
private List<ConstraintMetadata> childConstraints; |
| 36 | |
|
| 37 | |
private String comments; |
| 38 | |
|
| 39 | |
private String desc; |
| 40 | |
|
| 41 | |
private String id; |
| 42 | |
|
| 43 | |
private Integer maxLength; |
| 44 | |
|
| 45 | |
private Integer maxOccurs; |
| 46 | |
|
| 47 | |
private String maxValue; |
| 48 | |
|
| 49 | |
private Integer minLength; |
| 50 | |
|
| 51 | |
protected Integer minOccurs; |
| 52 | |
|
| 53 | |
private String minValue; |
| 54 | |
|
| 55 | |
private boolean serverSide; |
| 56 | |
|
| 57 | |
protected String specialValidator; |
| 58 | |
|
| 59 | |
private String validChars; |
| 60 | |
|
| 61 | |
private String validCharsMessageId; |
| 62 | |
|
| 63 | 155 | private boolean requiredForNextState = false; |
| 64 | |
|
| 65 | |
private String nextState; |
| 66 | |
|
| 67 | |
public List<ConstraintMetadata> getChildConstraints() { |
| 68 | 0 | return childConstraints; |
| 69 | |
} |
| 70 | |
|
| 71 | |
public void setChildConstraints(List<ConstraintMetadata> childConstraints) { |
| 72 | 0 | this.childConstraints = childConstraints; |
| 73 | 0 | } |
| 74 | |
|
| 75 | |
public String getComments() { |
| 76 | 0 | return comments; |
| 77 | |
} |
| 78 | |
|
| 79 | |
public void setComments(String comments) { |
| 80 | 32 | this.comments = comments; |
| 81 | 32 | } |
| 82 | |
|
| 83 | |
public String getDesc() { |
| 84 | 0 | return desc; |
| 85 | |
} |
| 86 | |
|
| 87 | |
public void setDesc(String desc) { |
| 88 | 63 | this.desc = desc; |
| 89 | 63 | } |
| 90 | |
|
| 91 | |
public String getId() { |
| 92 | 1781 | return id; |
| 93 | |
} |
| 94 | |
|
| 95 | |
public void setId(String id) { |
| 96 | 66 | this.id = id; |
| 97 | 66 | } |
| 98 | |
|
| 99 | |
public Integer getMaxLength() { |
| 100 | 140 | return maxLength; |
| 101 | |
} |
| 102 | |
|
| 103 | |
public void setMaxLength(Integer maxLength) { |
| 104 | 95 | this.maxLength = maxLength; |
| 105 | 95 | } |
| 106 | |
|
| 107 | |
public Integer getMaxOccurs() { |
| 108 | 37 | return maxOccurs; |
| 109 | |
} |
| 110 | |
|
| 111 | |
public void setMaxOccurs(Integer maxOccurs) { |
| 112 | 34 | this.maxOccurs = maxOccurs; |
| 113 | 34 | } |
| 114 | |
|
| 115 | |
public String getMaxValue() { |
| 116 | 0 | return maxValue; |
| 117 | |
} |
| 118 | |
|
| 119 | |
public void setMaxValue(String maxValue) { |
| 120 | 9 | this.maxValue = maxValue; |
| 121 | 9 | } |
| 122 | |
|
| 123 | |
public Integer getMinLength() { |
| 124 | 184 | return minLength; |
| 125 | |
} |
| 126 | |
|
| 127 | |
public void setMinLength(Integer minLength) { |
| 128 | 98 | this.minLength = minLength; |
| 129 | 98 | } |
| 130 | |
|
| 131 | |
public Integer getMinOccurs() { |
| 132 | 52 | return minOccurs; |
| 133 | |
} |
| 134 | |
|
| 135 | |
public void setMinOccurs(Integer minOccurs) { |
| 136 | 78 | this.minOccurs = minOccurs; |
| 137 | 78 | } |
| 138 | |
|
| 139 | |
public String getMinValue() { |
| 140 | 0 | return minValue; |
| 141 | |
} |
| 142 | |
|
| 143 | |
public void setMinValue(String minValue) { |
| 144 | 21 | this.minValue = minValue; |
| 145 | 21 | } |
| 146 | |
|
| 147 | |
public boolean isServerSide() { |
| 148 | 264 | return serverSide; |
| 149 | |
} |
| 150 | |
|
| 151 | |
public void setServerSide(boolean serverSide) { |
| 152 | 71 | this.serverSide = serverSide; |
| 153 | 71 | } |
| 154 | |
|
| 155 | |
public String getSpecialValidator() { |
| 156 | 0 | return specialValidator; |
| 157 | |
} |
| 158 | |
|
| 159 | |
public void setSpecialValidator(String specialValidator) { |
| 160 | 20 | this.specialValidator = specialValidator; |
| 161 | 20 | } |
| 162 | |
|
| 163 | |
public String getValidChars() { |
| 164 | 32 | return validChars; |
| 165 | |
} |
| 166 | |
|
| 167 | |
public void setValidChars(String validChars) { |
| 168 | 44 | this.validChars = validChars; |
| 169 | 44 | } |
| 170 | |
|
| 171 | |
public String getValidCharsMessageId() { |
| 172 | 0 | return validCharsMessageId; |
| 173 | |
} |
| 174 | |
|
| 175 | |
public void setValidCharsMessageId(String validCharsMessageId) { |
| 176 | 22 | this.validCharsMessageId = validCharsMessageId; |
| 177 | 22 | } |
| 178 | |
|
| 179 | |
public boolean isRequiredForNextState() { |
| 180 | 2 | return requiredForNextState; |
| 181 | |
} |
| 182 | |
|
| 183 | |
public void setRequiredForNextState(boolean requiredForNextState) { |
| 184 | 7 | this.requiredForNextState = requiredForNextState; |
| 185 | 7 | } |
| 186 | |
|
| 187 | |
public String getNextState() { |
| 188 | 2 | return nextState; |
| 189 | |
} |
| 190 | |
|
| 191 | |
public void setNextState(String nextState) { |
| 192 | 7 | this.nextState = nextState; |
| 193 | 7 | } |
| 194 | |
|
| 195 | |
@Override |
| 196 | |
public String toString() { |
| 197 | 0 | StringBuilder sb = new StringBuilder(); |
| 198 | 0 | _toString(sb); |
| 199 | 0 | return sb.toString(); |
| 200 | |
} |
| 201 | |
|
| 202 | |
protected void _toString(StringBuilder sb) { |
| 203 | 0 | sb.append("comments: "); |
| 204 | 0 | sb.append(comments); |
| 205 | 0 | sb.append(", desc: "); |
| 206 | 0 | sb.append(desc); |
| 207 | 0 | sb.append(", id: "); |
| 208 | 0 | sb.append(id); |
| 209 | 0 | sb.append(", maxLength: "); |
| 210 | 0 | sb.append(null != maxLength ? maxLength.toString() : "null"); |
| 211 | 0 | sb.append(", maxOccurs: "); |
| 212 | 0 | sb.append(null != maxOccurs ? maxOccurs.toString() : "null"); |
| 213 | 0 | sb.append(", maxValue: "); |
| 214 | 0 | sb.append(maxValue); |
| 215 | 0 | sb.append(", minLength: "); |
| 216 | 0 | sb.append(null != minLength ? minLength.toString() : "null"); |
| 217 | 0 | sb.append(", minOccurs: "); |
| 218 | 0 | sb.append(null != minOccurs ? minOccurs.toString() : "null"); |
| 219 | 0 | sb.append(", minValue: "); |
| 220 | 0 | sb.append(minValue); |
| 221 | 0 | sb.append(", serverSide: "); |
| 222 | 0 | sb.append(Boolean.toString(serverSide)); |
| 223 | 0 | sb.append(", specialValidator: "); |
| 224 | 0 | sb.append(specialValidator); |
| 225 | 0 | sb.append(", validCharsMessageId: "); |
| 226 | 0 | sb.append(validCharsMessageId); |
| 227 | 0 | sb.append(", validChars: "); |
| 228 | 0 | sb.append(validChars); |
| 229 | 0 | sb.append(", requiredForNextState: "); |
| 230 | 0 | sb.append(Boolean.toString(requiredForNextState)); |
| 231 | 0 | sb.append(", nextState: "); |
| 232 | 0 | sb.append(nextState); |
| 233 | 0 | sb.append(", ChildConstraints: {"); |
| 234 | 0 | if (null != childConstraints) { |
| 235 | 0 | for (ConstraintMetadata constraint : childConstraints) { |
| 236 | 0 | constraint._toString(sb); |
| 237 | |
} |
| 238 | |
} |
| 239 | 0 | sb.append("}"); |
| 240 | 0 | } |
| 241 | |
} |