| 1 | |
package org.kuali.student.r2.core.class1.process.service.decorators; |
| 2 | |
|
| 3 | |
import java.util.ArrayList; |
| 4 | |
import java.util.List; |
| 5 | |
|
| 6 | |
import org.apache.commons.lang.StringUtils; |
| 7 | |
import org.kuali.student.r2.common.datadictionary.DataDictionaryValidator; |
| 8 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
| 9 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
| 10 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
| 11 | |
import org.kuali.student.r2.common.exceptions.AlreadyExistsException; |
| 12 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
| 13 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
| 14 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
| 15 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
| 16 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
| 17 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
| 18 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
| 19 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
| 20 | |
import org.kuali.student.r2.common.infc.HoldsValidator; |
| 21 | |
import org.kuali.student.r2.core.class1.process.dao.InstructionDao; |
| 22 | |
import org.kuali.student.r2.core.process.dto.CheckInfo; |
| 23 | |
import org.kuali.student.r2.core.process.dto.InstructionInfo; |
| 24 | |
import org.kuali.student.r2.core.process.dto.ProcessCategoryInfo; |
| 25 | |
import org.kuali.student.r2.core.process.dto.ProcessInfo; |
| 26 | |
import org.kuali.student.r2.core.process.service.ProcessServiceDecorator; |
| 27 | |
|
| 28 | 0 | public class ProcessServiceValidationDecorator extends ProcessServiceDecorator implements HoldsValidator{ |
| 29 | |
|
| 30 | |
private DataDictionaryValidator validator; |
| 31 | |
private InstructionDao instructionDao; |
| 32 | |
|
| 33 | |
@Override |
| 34 | |
public DataDictionaryValidator getValidator() { |
| 35 | 0 | return validator; |
| 36 | |
} |
| 37 | |
|
| 38 | |
@Override |
| 39 | |
public void setValidator(DataDictionaryValidator validator) { |
| 40 | 0 | this.validator = validator; |
| 41 | 0 | } |
| 42 | |
|
| 43 | |
@Override |
| 44 | |
public List<ValidationResultInfo> validateProcessCategory(String validationTypeKey, ProcessCategoryInfo processCategoryInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 45 | 0 | if (null == validationTypeKey) { |
| 46 | 0 | throw new MissingParameterException("validationTypeKey"); |
| 47 | |
} |
| 48 | 0 | if (null == processCategoryInfo) { |
| 49 | 0 | throw new MissingParameterException("processCategoryInfo"); |
| 50 | |
} |
| 51 | 0 | if (null == contextInfo) { |
| 52 | 0 | throw new MissingParameterException("contextInfo"); |
| 53 | |
} |
| 54 | |
|
| 55 | |
List<ValidationResultInfo> errors; |
| 56 | 0 | errors = new ArrayList<ValidationResultInfo>(); |
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
|
| 62 | |
|
| 63 | |
|
| 64 | 0 | return errors; |
| 65 | |
} |
| 66 | |
|
| 67 | |
@Override |
| 68 | |
public ProcessCategoryInfo createProcessCategory(ProcessCategoryInfo processCategoryInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 69 | 0 | if (null == processCategoryInfo) { |
| 70 | 0 | throw new MissingParameterException("processCategoryInfo"); |
| 71 | |
} |
| 72 | 0 | if (null == contextInfo) { |
| 73 | 0 | throw new MissingParameterException("contextInfo"); |
| 74 | |
} |
| 75 | |
|
| 76 | 0 | if (null != processCategoryInfo.getId()) { |
| 77 | 0 | throw new ReadOnlyException("Id is not allowed to be supplied on a create"); |
| 78 | |
} |
| 79 | 0 | if (null != processCategoryInfo.getMeta()) { |
| 80 | 0 | throw new ReadOnlyException("MetaInfo is not allowed to be supplied on a create"); |
| 81 | |
} |
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | 0 | _processCategoryFullValidation(processCategoryInfo, contextInfo); |
| 86 | 0 | return getNextDecorator().createProcessCategory(processCategoryInfo, contextInfo); |
| 87 | |
} |
| 88 | |
|
| 89 | |
@Override |
| 90 | |
public StatusInfo addProcessToProcessCategory(String processKey, String processCategoryId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 91 | 0 | if (null == processKey) { |
| 92 | 0 | throw new MissingParameterException("processKey"); |
| 93 | |
} |
| 94 | 0 | if (null == processCategoryId) { |
| 95 | 0 | throw new MissingParameterException("processCategoryId"); |
| 96 | |
} |
| 97 | 0 | if (null == contextInfo) { |
| 98 | 0 | throw new MissingParameterException("contextInfo"); |
| 99 | |
} |
| 100 | 0 | return getNextDecorator().addProcessToProcessCategory(processKey, processCategoryId, contextInfo); |
| 101 | |
} |
| 102 | |
|
| 103 | |
@Override |
| 104 | |
public List<ProcessInfo> getProcessesForProcessCategory(String processCategoryId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 105 | 0 | if (null == processCategoryId) { |
| 106 | 0 | throw new MissingParameterException("processCategoryId"); |
| 107 | |
} |
| 108 | 0 | if (null == contextInfo) { |
| 109 | 0 | throw new MissingParameterException("contextInfo"); |
| 110 | |
} |
| 111 | 0 | return getNextDecorator().getProcessesForProcessCategory(processCategoryId, contextInfo); |
| 112 | |
} |
| 113 | |
|
| 114 | |
@Override |
| 115 | |
public List<ValidationResultInfo> validateProcess(String validationTypeKey, ProcessInfo processInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 116 | 0 | if (null == validationTypeKey) { |
| 117 | 0 | throw new MissingParameterException("validationTypeKey"); |
| 118 | |
} |
| 119 | 0 | if (null == processInfo) { |
| 120 | 0 | throw new MissingParameterException("processInfo"); |
| 121 | |
} |
| 122 | 0 | if (null == contextInfo) { |
| 123 | 0 | throw new MissingParameterException("contextInfo"); |
| 124 | |
} |
| 125 | |
|
| 126 | |
List<ValidationResultInfo> errors; |
| 127 | 0 | errors = new ArrayList<ValidationResultInfo>(); |
| 128 | |
|
| 129 | |
|
| 130 | |
|
| 131 | |
|
| 132 | |
|
| 133 | |
|
| 134 | |
|
| 135 | 0 | return errors; |
| 136 | |
} |
| 137 | |
|
| 138 | |
@Override |
| 139 | |
public ProcessInfo createProcess(String processKey, ProcessInfo processInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 140 | 0 | if (null == processKey) { |
| 141 | 0 | throw new MissingParameterException("processKey"); |
| 142 | |
} |
| 143 | 0 | if (null == processInfo) { |
| 144 | 0 | throw new MissingParameterException("processInfo"); |
| 145 | |
} |
| 146 | 0 | if (null == contextInfo) { |
| 147 | 0 | throw new MissingParameterException("contextInfo"); |
| 148 | |
} |
| 149 | |
|
| 150 | 0 | if (null != processInfo.getKey() && !processKey.equals(processInfo.getKey())) { |
| 151 | 0 | throw new InvalidParameterException("Process key different than supplied processKey"); |
| 152 | |
} |
| 153 | 0 | if (null != processInfo.getMeta()) { |
| 154 | 0 | throw new ReadOnlyException("MetaInfo is not allowed to be supplied on a create"); |
| 155 | |
} |
| 156 | |
|
| 157 | |
|
| 158 | |
|
| 159 | 0 | _processFullValidation(processInfo, contextInfo); |
| 160 | 0 | return getNextDecorator().createProcess(processKey, processInfo, contextInfo); |
| 161 | |
} |
| 162 | |
|
| 163 | |
@Override |
| 164 | |
public List<ValidationResultInfo> validateCheck(String validationTypeKey, CheckInfo checkInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 165 | 0 | if (null == validationTypeKey) { |
| 166 | 0 | throw new MissingParameterException("validationTypeKey"); |
| 167 | |
} |
| 168 | 0 | if (null == checkInfo) { |
| 169 | 0 | throw new MissingParameterException("checkInfo"); |
| 170 | |
} |
| 171 | 0 | if (null == contextInfo) { |
| 172 | 0 | throw new MissingParameterException("contextInfo"); |
| 173 | |
} |
| 174 | |
|
| 175 | |
List<ValidationResultInfo> errors; |
| 176 | 0 | errors = new ArrayList<ValidationResultInfo>(); |
| 177 | |
|
| 178 | |
|
| 179 | |
|
| 180 | |
|
| 181 | |
|
| 182 | |
|
| 183 | |
|
| 184 | 0 | return errors; |
| 185 | |
} |
| 186 | |
|
| 187 | |
@Override |
| 188 | |
public CheckInfo createCheck(String checkKey, CheckInfo checkInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 189 | 0 | if (null == checkKey) { |
| 190 | 0 | throw new MissingParameterException("checkKey"); |
| 191 | |
} |
| 192 | 0 | if (null == checkInfo) { |
| 193 | 0 | throw new MissingParameterException("checkInfo"); |
| 194 | |
} |
| 195 | 0 | if (null == contextInfo) { |
| 196 | 0 | throw new MissingParameterException("contextInfo"); |
| 197 | |
} |
| 198 | |
|
| 199 | 0 | if (StringUtils.isBlank(checkInfo.getTypeKey())){ |
| 200 | 0 | throw new InvalidParameterException("Check typeKey is required"); |
| 201 | |
} |
| 202 | 0 | if (StringUtils.isBlank(checkInfo.getStateKey())){ |
| 203 | 0 | throw new InvalidParameterException("Check stateKey is required"); |
| 204 | |
} |
| 205 | 0 | if (StringUtils.isBlank(checkInfo.getMilestoneTypeKey())){ |
| 206 | 0 | throw new InvalidParameterException("Check milestoneTypeKey is required"); |
| 207 | |
} |
| 208 | 0 | if (StringUtils.isBlank(checkInfo.getIssueId())){ |
| 209 | 0 | throw new InvalidParameterException("Check issueId is required"); |
| 210 | |
} |
| 211 | 0 | if (StringUtils.isBlank(checkInfo.getAgendaId())){ |
| 212 | 0 | throw new InvalidParameterException("Check agendaId is required"); |
| 213 | |
} |
| 214 | 0 | if (StringUtils.isBlank(checkInfo.getTypeKey())){ |
| 215 | 0 | throw new InvalidParameterException("Check typeKey is required"); |
| 216 | |
} |
| 217 | |
|
| 218 | 0 | if (null != checkInfo.getKey() && !checkKey.equals(checkInfo.getKey())) { |
| 219 | 0 | throw new InvalidParameterException("Check key different than supplied checkKey"); |
| 220 | |
} |
| 221 | 0 | if (null != checkInfo.getMeta()) { |
| 222 | 0 | throw new ReadOnlyException("MetaInfo is not allowed to be supplied on a create"); |
| 223 | |
} |
| 224 | |
|
| 225 | |
|
| 226 | |
|
| 227 | 0 | _checkFullValidation(checkInfo, contextInfo); |
| 228 | 0 | return getNextDecorator().createCheck(checkKey, checkInfo, contextInfo); |
| 229 | |
} |
| 230 | |
|
| 231 | |
@Override |
| 232 | |
public CheckInfo updateCheck(String checkKey, CheckInfo checkInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
| 233 | 0 | if (null == checkKey) { |
| 234 | 0 | throw new MissingParameterException("checkKey"); |
| 235 | |
} |
| 236 | 0 | if (null == checkInfo) { |
| 237 | 0 | throw new MissingParameterException("checkInfo"); |
| 238 | |
} |
| 239 | 0 | if (null == contextInfo) { |
| 240 | 0 | throw new MissingParameterException("contextInfo"); |
| 241 | |
} |
| 242 | |
|
| 243 | 0 | if (StringUtils.isBlank(checkInfo.getTypeKey())){ |
| 244 | 0 | throw new InvalidParameterException("Check typeKey is required"); |
| 245 | |
} |
| 246 | 0 | if (StringUtils.isBlank(checkInfo.getStateKey())){ |
| 247 | 0 | throw new InvalidParameterException("Check stateKey is required"); |
| 248 | |
} |
| 249 | 0 | if (StringUtils.isBlank(checkInfo.getMilestoneTypeKey())){ |
| 250 | 0 | throw new InvalidParameterException("Check milestoneTypeKey is required"); |
| 251 | |
} |
| 252 | 0 | if (StringUtils.isBlank(checkInfo.getIssueId())){ |
| 253 | 0 | throw new InvalidParameterException("Check issueId is required"); |
| 254 | |
} |
| 255 | 0 | if (StringUtils.isBlank(checkInfo.getAgendaId())){ |
| 256 | 0 | throw new InvalidParameterException("Check agendaId is required"); |
| 257 | |
} |
| 258 | 0 | if (StringUtils.isBlank(checkInfo.getTypeKey())){ |
| 259 | 0 | throw new InvalidParameterException("Check typeKey is required"); |
| 260 | |
} |
| 261 | |
|
| 262 | 0 | if (null != checkInfo.getKey() && !checkKey.equals(checkInfo.getKey())) { |
| 263 | 0 | throw new InvalidParameterException("Check key different than supplied checkKey"); |
| 264 | |
} |
| 265 | |
|
| 266 | 0 | return getNextDecorator().updateCheck(checkKey, checkInfo, contextInfo); |
| 267 | |
} |
| 268 | |
|
| 269 | |
@Override |
| 270 | |
public StatusInfo deleteCheck(String checkKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 271 | 0 | if (null == checkKey) { |
| 272 | 0 | throw new MissingParameterException("checkKey"); |
| 273 | |
} |
| 274 | 0 | if (null == contextInfo) { |
| 275 | 0 | throw new MissingParameterException("contextInfo"); |
| 276 | |
} |
| 277 | 0 | return getNextDecorator().deleteCheck(checkKey, contextInfo); |
| 278 | |
} |
| 279 | |
|
| 280 | |
@Override |
| 281 | |
public List<InstructionInfo> getInstructionsByProcess(String processKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 282 | 0 | if (null == processKey) { |
| 283 | 0 | throw new MissingParameterException("processKey"); |
| 284 | |
} |
| 285 | 0 | if (null == contextInfo) { |
| 286 | 0 | throw new MissingParameterException("contextInfo"); |
| 287 | |
} |
| 288 | |
|
| 289 | 0 | return getNextDecorator().getInstructionsByProcess(processKey, contextInfo); |
| 290 | |
} |
| 291 | |
|
| 292 | |
@Override |
| 293 | |
public List<ValidationResultInfo> validateInstruction(String validationTypeKey, String processKey, String checkKey, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 294 | 0 | if (null == validationTypeKey) { |
| 295 | 0 | throw new MissingParameterException("validationTypeKey"); |
| 296 | |
} |
| 297 | 0 | if (null == processKey) { |
| 298 | 0 | throw new MissingParameterException("processKey"); |
| 299 | |
} |
| 300 | 0 | if (null == checkKey) { |
| 301 | 0 | throw new MissingParameterException("checkKey"); |
| 302 | |
} |
| 303 | 0 | if (null == instructionInfo) { |
| 304 | 0 | throw new MissingParameterException("instructionInfo"); |
| 305 | |
} |
| 306 | 0 | if (null == contextInfo) { |
| 307 | 0 | throw new MissingParameterException("contextInfo"); |
| 308 | |
} |
| 309 | |
|
| 310 | |
List<ValidationResultInfo> errors; |
| 311 | 0 | errors = new ArrayList<ValidationResultInfo>(); |
| 312 | |
|
| 313 | |
|
| 314 | |
|
| 315 | |
|
| 316 | |
|
| 317 | |
|
| 318 | |
|
| 319 | 0 | return errors; |
| 320 | |
} |
| 321 | |
|
| 322 | |
@Override |
| 323 | |
public InstructionInfo createInstruction(String processKey, String checkKey, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
| 324 | 0 | if (null == processKey) { |
| 325 | 0 | throw new MissingParameterException("processKey"); |
| 326 | |
} |
| 327 | 0 | if (null == checkKey) { |
| 328 | 0 | throw new MissingParameterException("checkKey"); |
| 329 | |
} |
| 330 | 0 | if (null == instructionInfo) { |
| 331 | 0 | throw new MissingParameterException("instructionInfo"); |
| 332 | |
} |
| 333 | 0 | if (null == contextInfo) { |
| 334 | 0 | throw new MissingParameterException("contextInfo"); |
| 335 | |
} |
| 336 | |
|
| 337 | 0 | if (null != instructionInfo.getId()) { |
| 338 | 0 | throw new ReadOnlyException("Id is not allowed to be supplied on a create"); |
| 339 | |
} |
| 340 | 0 | if (null != instructionInfo.getMeta()) { |
| 341 | 0 | throw new ReadOnlyException("MetaInfo is not allowed to be supplied on a create"); |
| 342 | |
} |
| 343 | |
|
| 344 | 0 | if (null != instructionInfo.getProcessKey() && !processKey.equals(instructionInfo.getProcessKey())) { |
| 345 | 0 | throw new InvalidParameterException("Instruction processKey different than supplied processKey"); |
| 346 | |
} |
| 347 | |
|
| 348 | 0 | if (null != instructionInfo.getCheckKey() && !checkKey.equals(instructionInfo.getCheckKey())) { |
| 349 | 0 | throw new InvalidParameterException("Instruction checkKey different than supplied checkKey"); |
| 350 | |
} |
| 351 | |
|
| 352 | 0 | if (StringUtils.isBlank(instructionInfo.getTypeKey())){ |
| 353 | 0 | throw new InvalidParameterException("Instruction typeKey is required"); |
| 354 | |
} |
| 355 | 0 | if (StringUtils.isBlank(instructionInfo.getStateKey())){ |
| 356 | 0 | throw new InvalidParameterException("Instruction stateKey is required"); |
| 357 | |
} |
| 358 | 0 | if (null == instructionInfo.getAppliedAtpTypeKeys() || instructionInfo.getAppliedAtpTypeKeys().isEmpty()){ |
| 359 | 0 | throw new InvalidParameterException("Instruction appliedAtpTypeKeys is required"); |
| 360 | |
} |
| 361 | |
|
| 362 | |
|
| 363 | 0 | _instructionFullValidation(processKey, checkKey, instructionInfo, contextInfo); |
| 364 | 0 | return getNextDecorator().createInstruction(processKey, checkKey, instructionInfo, contextInfo); |
| 365 | |
} |
| 366 | |
|
| 367 | |
@Override |
| 368 | |
public InstructionInfo updateInstruction(String instructionId, InstructionInfo instructionInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
| 369 | 0 | if (null == instructionId) { |
| 370 | 0 | throw new MissingParameterException("instructionId"); |
| 371 | |
} |
| 372 | 0 | if (null == instructionInfo) { |
| 373 | 0 | throw new MissingParameterException("instructionInfo"); |
| 374 | |
} |
| 375 | 0 | if (null == contextInfo) { |
| 376 | 0 | throw new MissingParameterException("contextInfo"); |
| 377 | |
} |
| 378 | |
|
| 379 | 0 | if (null != instructionInfo.getId() && !instructionId.equals(instructionInfo.getId())) { |
| 380 | 0 | throw new InvalidParameterException("Instruction id different than supplied instructionId"); |
| 381 | |
} |
| 382 | |
|
| 383 | 0 | if (StringUtils.isBlank(instructionInfo.getProcessKey())) { |
| 384 | 0 | throw new InvalidParameterException("Instruction processKey is required"); |
| 385 | |
} |
| 386 | 0 | if (StringUtils.isBlank(instructionInfo.getCheckKey())) { |
| 387 | 0 | throw new InvalidParameterException("Instruction checkKey is required"); |
| 388 | |
} |
| 389 | 0 | if (StringUtils.isBlank(instructionInfo.getTypeKey())){ |
| 390 | 0 | throw new InvalidParameterException("Instruction typeKey is required"); |
| 391 | |
} |
| 392 | 0 | if (StringUtils.isBlank(instructionInfo.getStateKey())){ |
| 393 | 0 | throw new InvalidParameterException("Instruction stateKey is required"); |
| 394 | |
} |
| 395 | 0 | if (null == instructionInfo.getAppliedAtpTypeKeys() || instructionInfo.getAppliedAtpTypeKeys().isEmpty()){ |
| 396 | 0 | throw new InvalidParameterException("Instruction appliedAtpTypeKeys is required"); |
| 397 | |
} |
| 398 | |
|
| 399 | 0 | return getNextDecorator().updateInstruction(instructionId, instructionInfo, contextInfo); |
| 400 | |
} |
| 401 | |
|
| 402 | |
@Override |
| 403 | |
public List<InstructionInfo> getInstructionsForEvaluation(String processKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 404 | 0 | if (null == processKey) { |
| 405 | 0 | throw new MissingParameterException("processKey"); |
| 406 | |
} |
| 407 | 0 | if (null == contextInfo) { |
| 408 | 0 | throw new MissingParameterException("contextInfo"); |
| 409 | |
} |
| 410 | 0 | return getNextDecorator().getInstructionsForEvaluation(processKey, contextInfo); |
| 411 | |
} |
| 412 | |
|
| 413 | |
private void _processCategoryFullValidation(ProcessCategoryInfo processCategoryInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 414 | |
try { |
| 415 | 0 | List<ValidationResultInfo> errors = this.validateProcessCategory(DataDictionaryValidator.ValidationType.FULL_VALIDATION.toString(), processCategoryInfo, context); |
| 416 | 0 | if (!errors.isEmpty()) { |
| 417 | 0 | throw new DataValidationErrorException("Error(s) validating process Category", errors); |
| 418 | |
} |
| 419 | 0 | } catch (DoesNotExistException ex) { |
| 420 | 0 | throw new OperationFailedException("Error validating process Category", ex); |
| 421 | 0 | } |
| 422 | 0 | } |
| 423 | |
|
| 424 | |
private void _processFullValidation(ProcessInfo processInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 425 | |
try { |
| 426 | 0 | List<ValidationResultInfo> errors = this.validateProcess(DataDictionaryValidator.ValidationType.FULL_VALIDATION.toString(), processInfo, context); |
| 427 | 0 | if (!errors.isEmpty()) { |
| 428 | 0 | throw new DataValidationErrorException("Error(s) validating Process", errors); |
| 429 | |
} |
| 430 | 0 | } catch (DoesNotExistException ex) { |
| 431 | 0 | throw new OperationFailedException("Error validating Process", ex); |
| 432 | 0 | } |
| 433 | 0 | } |
| 434 | |
|
| 435 | |
private void _checkFullValidation(CheckInfo checkInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 436 | |
try { |
| 437 | 0 | List<ValidationResultInfo> errors = this.validateCheck(DataDictionaryValidator.ValidationType.FULL_VALIDATION.toString(), checkInfo, context); |
| 438 | 0 | if (!errors.isEmpty()) { |
| 439 | 0 | throw new DataValidationErrorException("Error(s) validating Check", errors); |
| 440 | |
} |
| 441 | 0 | } catch (DoesNotExistException ex) { |
| 442 | 0 | throw new OperationFailedException("Error validating Check", ex); |
| 443 | 0 | } |
| 444 | 0 | } |
| 445 | |
|
| 446 | |
private void _instructionFullValidation(String processKey, String checkKey, InstructionInfo instructionInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
| 447 | |
try { |
| 448 | 0 | List<ValidationResultInfo> errors = this.validateInstruction(DataDictionaryValidator.ValidationType.FULL_VALIDATION.toString(), processKey, checkKey, instructionInfo, context); |
| 449 | 0 | if (!errors.isEmpty()) { |
| 450 | 0 | throw new DataValidationErrorException("Error(s) validating Instruction", errors); |
| 451 | |
} |
| 452 | 0 | } catch (DoesNotExistException ex) { |
| 453 | 0 | throw new OperationFailedException("Error validating Instruction", ex); |
| 454 | 0 | } |
| 455 | 0 | } |
| 456 | |
|
| 457 | |
} |
| 458 | |
|