@Override public StreamDefinitionResource instantiateResource(StreamDefinition stream) { StreamDefinitionResource resource = new StreamDefinitionResource(stream.getName(), stream.getDslText()); resource.setStatus(calculateStreamState(stream.getName())); return resource; } }
@Override public StreamDefinitionResource instantiateResource(StreamDefinition stream) { final StreamDefinitionResource resource = new StreamDefinitionResource(stream.getName(), new ArgumentSanitizer().sanitizeStream(stream)); DeploymentState deploymentState = streamDeploymentStates.get(stream); if (deploymentState != null) { final DeploymentStateResource deploymentStateResource = ControllerUtils .mapState(deploymentState); resource.setStatus(deploymentStateResource.getKey()); resource.setStatusDescription(deploymentStateResource.getDescription()); } return resource; }
@Override public StreamDefinitionResource instantiateResource(StreamDefinition stream) { final StreamDefinitionResource resource = new StreamDefinitionResource(stream.getName(), new ArgumentSanitizer().sanitizeStream(stream)); DeploymentState deploymentState = streamDeploymentStates.get(stream); if (deploymentState != null) { final DeploymentStateResource deploymentStateResource = ControllerUtils .mapState(deploymentState); resource.setStatus(deploymentStateResource.getKey()); resource.setStatusDescription(deploymentStateResource.getDescription()); } return resource; }