private ModelTestModelDescriptionValidator(List<ValidationFailure> errors, ModelNode address, ModelNode description, ValidationConfiguration validationConfiguration) { if (address == null) { throw new IllegalArgumentException("Null address"); } if (description == null) { throw new IllegalArgumentException("Null address"); } this.errors = errors; this.address = address; this.description = description; this.validationConfiguration = validationConfiguration == null ? new ValidationConfiguration() : validationConfiguration; }
private static ValidationConfiguration createWithGlobalOperations() { ValidationConfiguration config = new ValidationConfiguration(); //TODO should be possible to validate the operations executed... final ModelNode ROOT_ADDR = new ModelNode().setEmptyList(); //Exclude the operations where one of the reply properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationParameter(ROOT_ADDR, VALIDATE_OPERATION, VALUE); config.allowNullValueTypeForOperationParameter(ROOT_ADDR, ValidateAddressOperationHandler.OPERATION_NAME, VALUE); //Exclude the operations where reply-properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_OPERATION_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_ATTRIBUTE_OPERATION); return config; }
private static ValidationConfiguration createWithGlobalOperations() { ValidationConfiguration config = new ValidationConfiguration(); //TODO should be possible to validate the operations executed... final ModelNode ROOT_ADDR = new ModelNode().setEmptyList(); //Exclude the operations where one of the reply properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationParameter(ROOT_ADDR, VALIDATE_OPERATION, VALUE); config.allowNullValueTypeForOperationParameter(ROOT_ADDR, ValidateAddressOperationHandler.OPERATION_NAME, VALUE); //Exclude the operations where reply-properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_OPERATION_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_ATTRIBUTE_OPERATION); return config; }