private static EPDeployPreconditionException makePreconditionExceptionPreconfigured(PathRegistryObjectType objectType, String name) { String message = "Required pre-configured "; message += objectType.getName() + " '" + name + "'"; message += " cannot be found"; return new EPDeployPreconditionException(message); }
private static void tryInvalidDeploy(RegressionEnvironment env, EPCompiled compiled, String text) { String message = "A precondition is not satisfied: Required " + text + " cannot be found"; try { env.runtime().getDeploymentService().deploy(compiled); fail(); } catch (EPDeployPreconditionException ex) { if (!message.equals("skip")) { SupportMessageAssertUtil.assertMessage(ex.getMessage(), message); } } catch (EPDeployException ex) { ex.printStackTrace(); fail(); } }
private static void tryInvalidDeploy(RegressionEnvironment env, EPCompiled compiled, String text, String moduleName) { String message = "A precondition is not satisfied: " + text + " has already been created for module '" + moduleName + "'"; try { env.runtime().getDeploymentService().deploy(compiled); fail(); } catch (EPDeployPreconditionException ex) { if (!message.equals("skip")) { SupportMessageAssertUtil.assertMessage(ex.getMessage(), message); } } catch (EPDeployException ex) { ex.printStackTrace(); fail(); } } }
private static EPDeployPreconditionException makePreconditionExceptionPath(PathRegistryObjectType objectType, NameAndModule nameAndModule) { String message = "Required dependency "; message += objectType.getName() + " '" + nameAndModule.getName() + "'"; if (nameAndModule.getModuleName() != null && nameAndModule.getModuleName().length() != 0) { message += " module '" + nameAndModule.getModuleName() + "'"; } message += " cannot be found"; return new EPDeployPreconditionException(message); }
private static void validateIndexPrecondition(EventTableIndexMetadata indexMetadata, ModuleIndexMeta index) throws EPDeployPreconditionException { if (indexMetadata.getIndexByName(index.getIndexName()) != null) { PathExceptionAlreadyRegistered ex = new PathExceptionAlreadyRegistered(index.getIndexName(), PathRegistryObjectType.INDEX, index.getIndexModuleName()); throw new EPDeployPreconditionException(ex.getMessage(), ex); } }
services.getNamedWindowPathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getTablePathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getEventTypePathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getContextPathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getVariablePathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getExprDeclaredPathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); services.getScriptPathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex);