/** * Validates the operation against the description providers in the model controller * * @param operation the operation to validate */ @Override public void validateOperation(ModelNode operation) { operationValidator.validateOperation(operation); }
/** * Validates operations against their description providers * * @param operations The operations to validate * @throws IllegalArgumentException if any operation is not valid */ public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
/** * Validates operations against their description providers * * @param operations The operations to validate * @throws IllegalArgumentException if any operation is not valid */ public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
/** * Validates operations against their description providers * * @param operations The operations to validate * @throws IllegalArgumentException if any operation is not valid */ public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
/** * Validates operations against their description providers * * @param operations The operations to validate * @throws IllegalArgumentException if any operation is not valid */ public void validateOperations(final List<ModelNode> operations) { if (operations == null) { return; } for (ModelNode operation : operations) { try { validateOperation(operation); } catch (RuntimeException e) { if (exitOnError) { throw e; } else { System.out.println("---- Operation validation error:"); System.out.println(e.getMessage()); } } } }
@Override protected boolean boot(List<ModelNode> bootOperations, boolean rollbackOnRuntimeFailure) throws ConfigurationPersistenceException { try { preBoot(bootOperations, rollbackOnRuntimeFailure); // See what we need to validate, but defer doing it to after super.boot to allow // initModel to run first and given tests a chance to set things up List<ModelNode> validationList = new ArrayList<>(); for (ModelNode op : bootOperations) { ModelNode toValidate = validateOpsFilter.adjustForValidation(op.clone()); if (toValidate != null) { validationList.add(toValidate); } } bootSuccess = super.boot(persister.getBootOperations(), rollbackOnRuntimeFailure); // Ok, now we can validate OperationValidator validator = new OperationValidator(rootRegistration); for (ModelNode op : validationList) { validator.validateOperation(op); } return bootSuccess; } catch (Exception e) { error = e; } catch (Throwable t) { error = new Exception(t); } finally { postBoot(); } return false; }
context.getFailureDescription().set(ControllerLogger.ROOT_LOGGER.managementResourceNotFoundMessage(addr)); } else { new OperationValidator(context, context.getResourceRegistration(), false, false, true).validateOperation(op);
} else { try { new OperationValidator(context.getResourceRegistration(), false, false).validateOperation(op); } catch (IllegalArgumentException e) { context.getFailureDescription().set(e.getMessage());
context.getFailureDescription().set(ControllerLogger.ROOT_LOGGER.managementResourceNotFoundMessage(addr)); } else { new OperationValidator(context, context.getResourceRegistration(), false, false, true).validateOperation(op);
context.getFailureDescription().set(MESSAGES.managementResourceNotFoundMessage(addr)); } else { new OperationValidator(context.getResourceRegistration(), false, false).validateOperation(op);