Examples of ModelValidationException


Examples of org.andromda.core.ModelValidationException

                AndroMDALogger.error(ctr + ") " + message);
            }
            AndroMDALogger.reset();
            if (this.failOnValidationErrors)
            {
                throw new ModelValidationException("Model validation failed!");
            }
        }
    }
View Full Code Here

Examples of org.camunda.bpm.model.xml.ModelValidationException

    this.schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA);
    URL bpmnSchema = ReflectUtil.getResource(BpmnModelConstants.BPMN_20_SCHEMA_LOCATION, BpmnParser.class.getClassLoader());
    try {
      this.schema = schemaFactory.newSchema(bpmnSchema);
    } catch (SAXException e) {
      throw new ModelValidationException("Unable to parse schema:" + bpmnSchema);
    }
  }
View Full Code Here

Examples of org.camunda.bpm.model.xml.ModelValidationException

    Validator validator = schema.newValidator();
    try {
      validator.validate(document.getDomSource());
    } catch (IOException e) {
      throw new ModelValidationException("Error during DOM document validation", e);
    } catch (SAXException e) {
      throw new ModelValidationException("DOM document is not valid", e);
    }
  }
View Full Code Here

Examples of org.camunda.bpm.model.xml.ModelValidationException

     this.schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA);
     URL cmmnSchema = ReflectUtil.getResource(CmmnModelConstants.CMMN_10_SCHEMA_LOCATION, CmmnParser.class.getClassLoader());
     try {
       this.schema = schemaFactory.newSchema(cmmnSchema);
     } catch (SAXException e) {
       throw new ModelValidationException("Unable to parse schema:" + cmmnSchema);
     }
   }
View Full Code Here

Examples of org.cishell.utility.datastructure.datamodel.exception.ModelValidationException

    if (namesOfFieldsWithValue.size() > 0) {
      String exceptionMessage = String.format(
        "Field's value must be not identical.  Matches %sfields: [%s]",
        this.baseFieldName,
        StringUtilities.implodeItems(namesOfFieldsWithValue, ", "));
      throw new ModelValidationException(exceptionMessage);
    }
  }
View Full Code Here

Examples of org.cishell.utility.datastructure.datamodel.exception.ModelValidationException

public class EmptyTextFieldValidationRule implements FieldValidationRule<String> {
  public void validateField(DataModelField<String> field, DataModel model)
      throws ModelValidationException {
    if (StringUtilities.isNull_Empty_OrWhitespace(field.getValue())) {
      String exceptionMessage = "Field may not be empty.";
      throw new ModelValidationException(exceptionMessage);
    }
  }
View Full Code Here

Examples of org.cishell.utility.datastructure.datamodel.exception.ModelValidationException

    if (namesOfFieldsWithValue.size() > 1) {
      String exceptionMessage = String.format(
        "Field's value must be not identical.  Matches %sfields: [%s]",
        this.baseFieldName,
        StringUtilities.implodeItems(namesOfFieldsWithValue, ", "));
      throw new ModelValidationException(exceptionMessage);
    }
  }
View Full Code Here

Examples of org.glassfish.jersey.server.model.ModelValidationException

                final ComponentModelValidator validator = new ComponentModelValidator(locator);
                validator.validate(resourceModel);
            }

            if (Errors.fatalIssuesFound() && !ignoreValidationErrors) {
                throw new ModelValidationException(LocalizationMessages.RESOURCE_MODEL_VALIDATION_FAILED_AT_INIT(),
                        ModelErrors.getErrorsAsResourceModelIssues(true));
            }
        } finally {
            if (ignoreValidationErrors) {
                Errors.logErrors(true);
View Full Code Here

Examples of org.glassfish.jersey.server.model.ModelValidationException

            public void run() {
                final ComponentModelValidator validator = new ComponentModelValidator(locator);
                validator.validate(component);

                if (Errors.fatalIssuesFound() && !ignoreFatalIssues) {
                    throw new ModelValidationException(LocalizationMessages.ERROR_VALIDATION_SUBRESOURCE(),
                            ModelErrors.getErrorsAsResourceModelIssues());
                }
            }
        });
    }
View Full Code Here

Examples of org.glassfish.jersey.server.model.ModelValidationException

                final ComponentModelValidator validator = new ComponentModelValidator(locator);
                validator.validate(resourceModel);
            }

            if (Errors.fatalIssuesFound() && !ignoreValidationErrors) {
                throw new ModelValidationException(LocalizationMessages.RESOURCE_MODEL_VALIDATION_FAILED_AT_INIT(),
                        ModelErrors.getErrorsAsResourceModelIssues(true));
            }
        } finally {
            if (ignoreValidationErrors) {
                Errors.logErrors(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.