public PathRegistry<String, NamedWindowMetaData> getNamedWindowPathRegistry() { return servicesContext.getNamedWindowPathRegistry(); }
public EPCompilerPathable getRuntimePath() { EPServicesContext services = runtimeEnvironment.getServices(); VariableRepositoryPreconfigured variables = new VariableRepositoryPreconfigured(); for (Map.Entry<String, VariableDeployment> entry : services.getVariableManagementService().getDeploymentsWithVariables().entrySet()) { for (Map.Entry<String, Variable> variableEntry : entry.getValue().getVariables().entrySet()) { if (variableEntry.getValue().getMetaData().isPreconfigured()) { variables.addVariable(variableEntry.getKey(), variableEntry.getValue().getMetaData()); } } } EventTypeRepositoryImpl eventTypes = new EventTypeRepositoryImpl(true); for (Map.Entry<String, EventType> entry : services.getEventTypeRepositoryBus().getNameToTypeMap().entrySet()) { if (entry.getValue().getMetadata().getAccessModifier() == NameAccessModifier.PRECONFIGURED) { eventTypes.addType(entry.getValue()); } } return new EPCompilerPathableImpl( services.getVariablePathRegistry().copy(), services.getEventTypePathRegistry().copy(), services.getExprDeclaredPathRegistry().copy(), services.getNamedWindowPathRegistry().copy(), services.getTablePathRegistry().copy(), services.getContextPathRegistry().copy(), services.getScriptPathRegistry().copy(), eventTypes, variables); }
static void deleteFromPathRegistries(EPServicesContext services, String deploymentId) { services.getEventTypePathRegistry().deleteDeployment(deploymentId); services.getNamedWindowPathRegistry().deleteDeployment(deploymentId); services.getTablePathRegistry().deleteDeployment(deploymentId); services.getContextPathRegistry().deleteDeployment(deploymentId); services.getVariablePathRegistry().deleteDeployment(deploymentId); services.getExprDeclaredPathRegistry().deleteDeployment(deploymentId); services.getScriptPathRegistry().deleteDeployment(deploymentId); }
if (entry.getValue().getEventType().getMetadata().getAccessModifier().isNonPrivateNonTransient()) { try { services.getNamedWindowPathRegistry().add(entry.getKey(), moduleName, entry.getValue(), deploymentId); } catch (PathExceptionAlreadyRegistered ex) { throw new EPDeployPreconditionException(ex.getMessage(), ex); NamedWindowMetaData namedWindow = services.getNamedWindowPathRegistry().getWithModule(index.getInfraName(), index.getInfraModuleName()); if (namedWindow == null) { throw new IllegalStateException("Failed to find named window '" + index.getInfraName() + "'");
public static void checkModulePreconditions(String deploymentId, String moduleName, DeploymentInternal deployment, EPServicesContext services) throws EPUndeployPreconditionException { for (String namedWindow : deployment.getPathNamedWindows()) { checkDependency(services.getNamedWindowPathRegistry(), namedWindow, moduleName); NamedWindowMetaData namedWindow = services.getNamedWindowPathRegistry().getWithModule(index.getInfraName(), index.getInfraModuleName()); validateIndexPrecondition(namedWindow.getIndexMetadata(), index, deploymentId); } else {
String depIdNamedWindow = services.getNamedWindowPathRegistry().getDeploymentId(pathNamedWindow.getName(), pathNamedWindow.getModuleName()); if (depIdNamedWindow == null) { throw makePreconditionExceptionPath(PathRegistryObjectType.NAMEDWINDOW, pathNamedWindow); if (index.isNamedWindow()) { NameAndModule namedWindowName = NameAndModule.findName(index.getInfraName(), moduleDependencies.getPathNamedWindows()); NamedWindowMetaData namedWindow = services.getNamedWindowPathRegistry().getWithModule(namedWindowName.getName(), namedWindowName.getModuleName()); depIdIndex = namedWindow.getIndexMetadata().getIndexDeploymentId(index.getIndexName()); } else {
services.getNamedWindowPathRegistry().addDependency(namedWindow.getName(), namedWindow.getModuleName(), deploymentId); if (index.isNamedWindow()) { NameAndModule namedWindowName = NameAndModule.findName(index.getInfraName(), moduleDependencies.getPathNamedWindows()); NamedWindowMetaData namedWindow = services.getNamedWindowPathRegistry().getWithModule(namedWindowName.getName(), namedWindowName.getModuleName()); indexMetadata = namedWindow.getIndexMetadata(); } else {
services.getNamedWindowPathRegistry().removeDependency(namedWindow.getName(), namedWindow.getModuleName(), deploymentId); if (index.isNamedWindow()) { NameAndModule namedWindowName = NameAndModule.findName(index.getInfraName(), moduleDependencies.getPathNamedWindows()); NamedWindowMetaData namedWindow = services.getNamedWindowPathRegistry().getWithModule(namedWindowName.getName(), namedWindowName.getModuleName()); indexMetadata = namedWindow.getIndexMetadata(); } else {