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