public boolean hasErrors() { if (validation.hasErrors()) return true; for (EjbModule module : ejbModules) { if (module.getValidation().hasErrors()) return true; } for (ClientModule module : clientModules) { if (module.getValidation().hasErrors()) return true; } for (ConnectorModule module : connectorModules) { if (module.getValidation().hasErrors()) return true; } for (WebModule module : webModules) { if (module.getValidation().hasErrors()) return true; } return false; }
public boolean hasErrors() { if (validation.hasErrors()) { return true; } for (final EjbModule module : ejbModules) { if (module.getValidation().hasErrors()) { return true; } } for (final ClientModule module : clientModules) { if (module.getValidation().hasErrors()) { return true; } } for (final ConnectorModule module : connectorModules) { if (module.getValidation().hasErrors()) { return true; } } for (final WebModule module : webModules) { if (module.getValidation().hasErrors()) { return true; } } return false; }
public boolean hasErrors() { if (validation.hasErrors()) { return true; } for (final EjbModule module : ejbModules) { if (module.getValidation().hasErrors()) { return true; } } for (final ClientModule module : clientModules) { if (module.getValidation().hasErrors()) { return true; } } for (final ConnectorModule module : connectorModules) { if (module.getValidation().hasErrors()) { return true; } } for (final WebModule module : webModules) { if (module.getValidation().hasErrors()) { return true; } } return false; }
public boolean isValid() { ValidationContext context = validate(); return !context.hasFailures() && !context.hasErrors(); }
public boolean isValid() { final ValidationContext context = validate(); return !context.hasFailures() && !context.hasErrors(); }
public boolean isValid() { ValidationContext context = validate(); return !context.hasFailures() && !context.hasErrors(); }
public AppModule deploy(final AppModule appModule) throws OpenEJBException { boolean output = SystemInstance.get().getOptions().get(OUTPUT_DESCRIPTORS, false); if (output && appModule.getCmpMappings() != null) { writeGenratedCmpMappings(appModule); } for (final EjbModule ejbModule : appModule.getEjbModules()) { final Options options = new Options(ejbModule.getOpenejbJar().getProperties(), SystemInstance.get().getOptions()); final ValidationContext context = ejbModule.getValidation(); // output descriptors by default if there are validation errors final boolean invalid = context.hasErrors() || context.hasFailures(); output = options.get(OUTPUT_DESCRIPTORS, invalid); if (output) { if (ejbModule.getEjbJar() != null) { writeEjbJar(ejbModule); } if (ejbModule.getOpenejbJar() != null) { writeOpenejbJar(ejbModule); } writeGeronimoOpenejb(ejbModule); } } for (final ConnectorModule connectorModule : appModule.getConnectorModules()) { writeRaXml(connectorModule); } return appModule; }
public AppModule deploy(final AppModule appModule) throws OpenEJBException { boolean output = SystemInstance.get().getOptions().get(OUTPUT_DESCRIPTORS, false); if (output && appModule.getCmpMappings() != null) { writeGenratedCmpMappings(appModule); } for (final EjbModule ejbModule : appModule.getEjbModules()) { final Options options = new Options(ejbModule.getOpenejbJar().getProperties(), SystemInstance.get().getOptions()); final ValidationContext context = ejbModule.getValidation(); // output descriptors by default if there are validation errors final boolean invalid = context.hasErrors() || context.hasFailures(); output = options.get(OUTPUT_DESCRIPTORS, invalid); if (output) { if (ejbModule.getEjbJar() != null) { writeEjbJar(ejbModule); } if (ejbModule.getOpenejbJar() != null) { writeOpenejbJar(ejbModule); } writeGeronimoOpenejb(ejbModule); } } for (final ConnectorModule connectorModule : appModule.getConnectorModules()) { writeRaXml(connectorModule); } return appModule; }
private void logResults(final ValidationContext context, final Level level) { for (final ValidationError e : context.getErrors()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (final ValidationFailure e : context.getFailures()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (final ValidationWarning e : context.getWarnings()) { logger.warning(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } if (context.hasErrors() || context.hasFailures()) { final DeploymentModule module = context.getModule(); logger.error(String.format("Invalid %s(name=%s, path=%s)", context.getModuleType(), module.getModuleId(), module.getFile())); // logger.error("Validation: "+errors.length + " errors, "+failures.length+ " failures, in "+context.getModuleType()+"(path="+context.getJarPath()+")"); } else if (context.hasWarnings()) { if (context.getWarnings().length == 1) { logger.warning(context.getWarnings().length + " warning for " + context.getModuleType() + "(path=" + context.getName() + ")"); } else { logger.warning(context.getWarnings().length + " warnings for " + context.getModuleType() + "(path=" + context.getName() + ")"); } } }
private void logResults(final ValidationContext context, final Level level) { for (final ValidationError e : context.getErrors()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (final ValidationFailure e : context.getFailures()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (final ValidationWarning e : context.getWarnings()) { logger.warning(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } if (context.hasErrors() || context.hasFailures()) { final DeploymentModule module = context.getModule(); logger.error(String.format("Invalid %s(name=%s, path=%s)", context.getModuleType(), module.getModuleId(), module.getFile())); // logger.error("Validation: "+errors.length + " errors, "+failures.length+ " failures, in "+context.getModuleType()+"(path="+context.getJarPath()+")"); } else if (context.hasWarnings()) { if (context.getWarnings().length == 1) { logger.warning(context.getWarnings().length + " warning for " + context.getModuleType() + "(path=" + context.getName() + ")"); } else { logger.warning(context.getWarnings().length + " warnings for " + context.getModuleType() + "(path=" + context.getName() + ")"); } } }
private void logResults(ValidationContext context, Level level) { for (ValidationError e : context.getErrors()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (ValidationFailure e : context.getFailures()) { logger.error(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } for (ValidationWarning e : context.getWarnings()) { logger.warning(e.getPrefix() + " ... " + e.getComponentName() + ":\t" + e.getMessage(level.ordinal() + 1)); } if (context.hasErrors() || context.hasFailures()) { logger.error("Invalid "+context.getModuleType()+"(path="+context.getJarPath()+")"); // logger.error("Validation: "+errors.length + " errors, "+failures.length+ " failures, in "+context.getModuleType()+"(path="+context.getJarPath()+")"); } else if (context.hasWarnings()) { if (context.getWarnings().length == 1) { logger.warning(context.getWarnings().length +" warning for "+context.getModuleType()+"(path="+context.getJarPath()+")"); } else { logger.warning(context.getWarnings().length +" warnings for "+context.getModuleType()+"(path="+context.getJarPath()+")"); } } }