@Override public String toString() { return "Staging [command=" + getCommand() + " buildpack=" + getBuildpackUrl() + " stack=" + getStack() + " healthCheckTimeout=" + getHealthCheckTimeout() + "]"; } }
private void addStagingToRequest(Staging staging, HashMap<String, Object> appRequest) { if (staging.getBuildpackUrl() != null) { appRequest.put("buildpack", staging.getBuildpackUrl()); } if (staging.getCommand() != null) { appRequest.put("command", staging.getCommand()); } if (staging.getStack() != null) { appRequest.put("stack_guid", getStack(staging.getStack()).getMeta().getGuid()); } if (staging.getHealthCheckTimeout() != null) { appRequest.put("health_check_timeout", staging.getHealthCheckTimeout()); } }
private boolean hasChanged(Staging staging, Staging existingStaging) { String buildpackUrl = staging.getBuildpackUrl(); String command = staging.getCommand(); String stack = staging.getStack(); Integer healthCheckTimeout = staging.getHealthCheckTimeout(); String healthCheckType = staging.getHealthCheckType(); String healthCheckHttpEndpoint = staging.getHealthCheckHttpEndpoint(); Boolean sshEnabled = staging.isSshEnabled(); return (buildpackUrl != null && !buildpackUrl.equals(existingStaging.getBuildpackUrl())) || (command != null && !command.equals(existingStaging.getCommand())) || (stack != null && !stack.equals(existingStaging.getStack())) || (healthCheckTimeout != null && !healthCheckTimeout.equals(existingStaging.getHealthCheckTimeout())) || (healthCheckType != null && !healthCheckType.equals(existingStaging.getHealthCheckType())) || (healthCheckHttpEndpoint != null && !healthCheckHttpEndpoint.equals(existingStaging.getHealthCheckHttpEndpoint())) || (sshEnabled != null && !sshEnabled.equals(existingStaging.isSshEnabled()) || isDockerInfoModified(existingStaging.getDockerInfo(), staging.getDockerInfo())); }
private boolean hasChanged(Staging staging, Staging existingStaging) { String buildpackUrl = staging.getBuildpackUrl(); String command = staging.getCommand(); String stack = staging.getStack(); Integer healthCheckTimeout = staging.getHealthCheckTimeout(); String healthCheckType = staging.getHealthCheckType(); String healthCheckHttpEndpoint = staging.getHealthCheckHttpEndpoint(); Boolean sshEnabled = staging.isSshEnabled(); return (buildpackUrl != null && !buildpackUrl.equals(existingStaging.getBuildpackUrl())) || (command != null && !command.equals(existingStaging.getCommand())) || (stack != null && !stack.equals(existingStaging.getStack())) || (healthCheckTimeout != null && !healthCheckTimeout.equals(existingStaging.getHealthCheckTimeout())) || (healthCheckType != null && !healthCheckType.equals(existingStaging.getHealthCheckType())) || (healthCheckHttpEndpoint != null && !healthCheckHttpEndpoint.equals(existingStaging.getHealthCheckHttpEndpoint())) || (sshEnabled != null && !sshEnabled.equals(existingStaging.isSshEnabled()) || isDockerInfoModified(existingStaging.getDockerInfo(), staging.getDockerInfo())); }
private Map<String, Object> createStagingParameters(Staging staging) { Map<String, Object> stagingParameters = new HashMap<>(); if (staging.getBuildpackUrl() != null) { stagingParameters.put(BUILDPACK_PARAMETER, staging.getBuildpackUrl()); } if (staging.getCommand() != null) { stagingParameters.put(COMMAND_PARAMETER, staging.getCommand()); } if (staging.getHealthCheckTimeout() != null) { stagingParameters.put(HEALTH_CHECK_TIMEOUT_PARAMETER, staging.getHealthCheckTimeout()); } if (staging.getHealthCheckType() != null) { stagingParameters.put(HEALTH_CHECK_TYPE_PARAMETER, staging.getHealthCheckType()); } if (staging.getHealthCheckHttpEndpoint() != null) { stagingParameters.put(HEALTH_CHECK_HTTP_ENDPOINT_PARAMETER, staging.getHealthCheckHttpEndpoint()); } if (staging.isSshEnabled() != null) { stagingParameters.put(ENABLE_SSH_PARAMETER, staging.isSshEnabled()); } if (staging.getDockerInfo() != null) { stagingParameters.put(DOCKER_IMAGE, staging.getDockerInfo().getImage()); if (staging.getDockerInfo().getDockerCredentials() != null) { stagingParameters.put(DOCKER_CREDENTIALS, staging.getDockerInfo().getDockerCredentials()); } } return stagingParameters; }
@Override public String toString() { return "Staging [command=" + getCommand() + " buildpack=" + getBuildpackUrl() + " stack=" + getStack() + " healthCheckTimeout=" + getHealthCheckTimeout() + " healthCheckType" + getHealthCheckType() + " healthCheckHttpEndpoint=" + getHealthCheckHttpEndpoint() + " sshEnabled=" + isSshEnabled() + "]"; } }
private void addStagingToRequest(Staging staging, HashMap<String, Object> appRequest) { if (staging.getBuildpackUrl() != null) { appRequest.put("buildpack", staging.getBuildpackUrl());
private Map<String, Object> getStagingMap(Staging staging) { Map<String, Object> stagingParameters = new HashMap<>(); if (staging.getBuildpackUrl() != null) { stagingParameters.put("buildpack", staging.getBuildpackUrl()); } if (staging.getCommand() != null) { stagingParameters.put("command", staging.getCommand()); } if (staging.getHealthCheckTimeout() != null) { stagingParameters.put("health_check_timeout", staging.getHealthCheckTimeout()); } if (staging.getHealthCheckType() != null) { stagingParameters.put("health_check_type", staging.getHealthCheckType()); } if (staging.getHealthCheckHttpEndpoint() != null) { stagingParameters.put("health_check_http_endpoint", staging.getHealthCheckHttpEndpoint()); } if (staging.isSshEnabled() != null) { stagingParameters.put("enable_ssh", staging.isSshEnabled()); } return stagingParameters; }
if (staging != null && staging.getBuildpackUrl() != null) { application.put(BUILDPACK_PROP, staging.getBuildpackUrl());