String producerPropertyPrefix = String.format("module.%s.producer.", module.getLabel()); String consumerPropertyPrefix = String.format("module.%s.consumer.", module.getLabel()); String modulePrefix = String.format("module.%s.", module.getLabel()); for (Map.Entry<String, String> entry : streamDeploymentProperties.entrySet()) { if (entry.getKey().startsWith(modulePrefix)) {
CompletionProposal.Factory proposals = CompletionProposal.expanding("tap:stream:" + streamName + "."); for (ModuleDefinition moduleDefinition : streamDefinition.getModuleDefinitions()) { if (moduleDefinition.getLabel().startsWith(moduleName)) { collector.add(proposals.withSuffix(moduleDefinition.getLabel()));
@Override public ModuleDeploymentId deploy(ModuleDeploymentRequest request) { ModuleDefinition definition = request.getDefinition(); ModuleDeploymentId moduleDeploymentId = new ModuleDeploymentId(definition.getGroup(), definition.getLabel()); String applicationName = this.cloudFoundryModuleDeploymentConverter.toApplicationName(moduleDeploymentId); PushBindAndStartApplicationResults response = this.resourceClient.pushBindAndStartApplication(new PushBindAndStartApplicationParameters() .withEnvironment(this.cloudFoundryModuleDeploymentConverter.toModuleLauncherEnvironment(request)) .withInstances(request.getCount()) .withName(applicationName) .withResource(properties.getModuleLauncherLocation()) .withServiceInstanceNames(this.properties.getServices()) ); if (!response.isCreateSucceeded()) { throw new IllegalStateException("Module " + moduleDeploymentId + " could not be deployed"); } return moduleDeploymentId; }