class CollectSystemParametersStep extends SyncFlowableStep {

    private String getDefaultDomain(CloudControllerClient client, ProcessContext context) {
        try {
            return client.getDefaultDomain()
                         .getName();
        } catch (CloudOperationException e) {
            if (e.getStatusCode() == HttpStatus.NOT_FOUND) {
                context.setVariable(Variables.MISSING_DEFAULT_DOMAIN, true);
                return DEFAULT_DOMAIN_PLACEHOLDER;
            }
            throw e;
        }
    }

}