Class CloudControllerRestClientImpl
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.rest.CloudControllerRestClientImpl
-
- All Implemented Interfaces:
CloudControllerRestClient
public class CloudControllerRestClientImpl extends Object implements CloudControllerRestClient
Abstract implementation of the CloudControllerClient intended to serve as the base.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCloudControllerRestClientImpl()Only for unit tests.CloudControllerRestClientImpl(org.cloudfoundry.client.CloudFoundryClient delegate)CloudControllerRestClientImpl(org.cloudfoundry.client.CloudFoundryClient delegate, CloudSpace target)
-
Method Summary
-
-
-
Constructor Detail
-
CloudControllerRestClientImpl
protected CloudControllerRestClientImpl()
Only for unit tests. This works around the fact that the initialize method is called within the constructor and hence can not be overloaded, making it impossible to write unit tests that don't trigger network calls.
-
CloudControllerRestClientImpl
public CloudControllerRestClientImpl(org.cloudfoundry.client.CloudFoundryClient delegate)
-
CloudControllerRestClientImpl
public CloudControllerRestClientImpl(org.cloudfoundry.client.CloudFoundryClient delegate, CloudSpace target)
-
-
Method Detail
-
getTarget
public CloudSpace getTarget()
- Specified by:
getTargetin interfaceCloudControllerRestClient
-
addDomain
public void addDomain(String domainName)
- Specified by:
addDomainin interfaceCloudControllerRestClient
-
addRoute
public void addRoute(String host, String domainName, String path)
- Specified by:
addRoutein interfaceCloudControllerRestClient
-
bindServiceInstance
public Optional<String> bindServiceInstance(String applicationName, String serviceInstanceName)
- Specified by:
bindServiceInstancein interfaceCloudControllerRestClient
-
bindServiceInstance
public Optional<String> bindServiceInstance(String applicationName, String serviceInstanceName, Map<String,Object> parameters)
- Specified by:
bindServiceInstancein interfaceCloudControllerRestClient
-
createApplication
public void createApplication(ApplicationToCreateDto applicationToCreateDto)
- Specified by:
createApplicationin interfaceCloudControllerRestClient
-
createServiceInstance
public void createServiceInstance(CloudServiceInstance serviceInstance)
- Specified by:
createServiceInstancein interfaceCloudControllerRestClient
-
createServiceBroker
public String createServiceBroker(CloudServiceBroker serviceBroker)
- Specified by:
createServiceBrokerin interfaceCloudControllerRestClient
-
createAndFetchServiceKey
public CloudServiceKey createAndFetchServiceKey(CloudServiceKey keyModel, String serviceInstanceName)
- Specified by:
createAndFetchServiceKeyin interfaceCloudControllerRestClient
-
createServiceKey
public Optional<String> createServiceKey(CloudServiceKey keyModel, String serviceInstanceName)
- Specified by:
createServiceKeyin interfaceCloudControllerRestClient
-
createServiceKey
public Optional<String> createServiceKey(String serviceInstanceName, String serviceKeyName, Map<String,Object> parameters)
- Specified by:
createServiceKeyin interfaceCloudControllerRestClient
-
createUserProvidedServiceInstance
public void createUserProvidedServiceInstance(CloudServiceInstance serviceInstance)
- Specified by:
createUserProvidedServiceInstancein interfaceCloudControllerRestClient
-
deleteApplication
public void deleteApplication(String applicationName)
- Specified by:
deleteApplicationin interfaceCloudControllerRestClient
-
deleteDomain
public void deleteDomain(String domainName)
- Specified by:
deleteDomainin interfaceCloudControllerRestClient
-
deleteOrphanedRoutes
public void deleteOrphanedRoutes()
Delete routes that do not have any application which is assigned to them.- Specified by:
deleteOrphanedRoutesin interfaceCloudControllerRestClient
-
deleteRoute
public void deleteRoute(String host, String domainName, String path)
- Specified by:
deleteRoutein interfaceCloudControllerRestClient
-
deleteServiceInstance
public void deleteServiceInstance(String serviceInstanceName)
- Specified by:
deleteServiceInstancein interfaceCloudControllerRestClient
-
deleteServiceInstance
public void deleteServiceInstance(CloudServiceInstance serviceInstance)
- Specified by:
deleteServiceInstancein interfaceCloudControllerRestClient
-
deleteServiceBroker
public String deleteServiceBroker(String name)
- Specified by:
deleteServiceBrokerin interfaceCloudControllerRestClient
-
deleteServiceBinding
public Optional<String> deleteServiceBinding(String serviceInstanceName, String serviceKeyName)
- Specified by:
deleteServiceBindingin interfaceCloudControllerRestClient
-
getApplication
public CloudApplication getApplication(String applicationName)
- Specified by:
getApplicationin interfaceCloudControllerRestClient
-
getApplication
public CloudApplication getApplication(String applicationName, boolean required)
- Specified by:
getApplicationin interfaceCloudControllerRestClient
-
getApplicationGuid
public UUID getApplicationGuid(String applicationName)
- Specified by:
getApplicationGuidin interfaceCloudControllerRestClient
-
getApplicationName
public String getApplicationName(UUID applicationGuid)
- Specified by:
getApplicationNamein interfaceCloudControllerRestClient
-
getApplicationEnvironment
public Map<String,String> getApplicationEnvironment(UUID applicationGuid)
- Specified by:
getApplicationEnvironmentin interfaceCloudControllerRestClient
-
getApplicationEnvironment
public Map<String,String> getApplicationEnvironment(String applicationName)
- Specified by:
getApplicationEnvironmentin interfaceCloudControllerRestClient
-
getApplicationEvents
public List<CloudEvent> getApplicationEvents(String applicationName)
- Specified by:
getApplicationEventsin interfaceCloudControllerRestClient
-
getEventsByTarget
public List<CloudEvent> getEventsByTarget(UUID uuid)
- Specified by:
getEventsByTargetin interfaceCloudControllerRestClient
-
getApplicationInstances
public InstancesInfo getApplicationInstances(CloudApplication application)
- Specified by:
getApplicationInstancesin interfaceCloudControllerRestClient
-
getApplicationInstances
public InstancesInfo getApplicationInstances(UUID applicationGuid)
- Specified by:
getApplicationInstancesin interfaceCloudControllerRestClient
-
getApplicationProcess
public CloudProcess getApplicationProcess(UUID applicationGuid)
- Specified by:
getApplicationProcessin interfaceCloudControllerRestClient
-
getApplicationRoutes
public List<CloudRoute> getApplicationRoutes(UUID applicationGuid)
- Specified by:
getApplicationRoutesin interfaceCloudControllerRestClient
-
getApplicationSshEnabled
public boolean getApplicationSshEnabled(UUID applicationGuid)
- Specified by:
getApplicationSshEnabledin interfaceCloudControllerRestClient
-
getApplications
public List<CloudApplication> getApplications()
- Specified by:
getApplicationsin interfaceCloudControllerRestClient
-
getApplicationsByMetadataLabelSelector
public List<CloudApplication> getApplicationsByMetadataLabelSelector(String labelSelector)
- Specified by:
getApplicationsByMetadataLabelSelectorin interfaceCloudControllerRestClient
-
getDefaultDomain
public CloudDomain getDefaultDomain()
- Specified by:
getDefaultDomainin interfaceCloudControllerRestClient
-
getSharedDomains
public List<CloudDomain> getSharedDomains()
- Specified by:
getSharedDomainsin interfaceCloudControllerRestClient
-
getDomains
public List<CloudDomain> getDomains()
- Specified by:
getDomainsin interfaceCloudControllerRestClient
-
getDomainsForOrganization
public List<CloudDomain> getDomainsForOrganization()
- Specified by:
getDomainsForOrganizationin interfaceCloudControllerRestClient
-
getPrivateDomains
public List<CloudDomain> getPrivateDomains()
- Specified by:
getPrivateDomainsin interfaceCloudControllerRestClient
-
getEvents
public List<CloudEvent> getEvents()
- Specified by:
getEventsin interfaceCloudControllerRestClient
-
getRoutes
public List<CloudRoute> getRoutes(String domainName)
- Specified by:
getRoutesin interfaceCloudControllerRestClient
-
getRequiredServiceInstanceGuid
public UUID getRequiredServiceInstanceGuid(String name)
- Specified by:
getRequiredServiceInstanceGuidin interfaceCloudControllerRestClient
-
getServiceInstance
public CloudServiceInstance getServiceInstance(String serviceInstanceName)
- Specified by:
getServiceInstancein interfaceCloudControllerRestClient
-
getServiceInstance
public CloudServiceInstance getServiceInstance(String serviceInstanceName, boolean required)
- Specified by:
getServiceInstancein interfaceCloudControllerRestClient
-
getServiceBinding
public CloudServiceBinding getServiceBinding(UUID serviceBindingGuid)
- Specified by:
getServiceBindingin interfaceCloudControllerRestClient
-
getServiceAppBindings
public List<CloudServiceBinding> getServiceAppBindings(UUID serviceInstanceGuid)
- Specified by:
getServiceAppBindingsin interfaceCloudControllerRestClient
-
getAppBindings
public List<CloudServiceBinding> getAppBindings(UUID applicationGuid)
- Specified by:
getAppBindingsin interfaceCloudControllerRestClient
-
getServiceBindingForApplication
public CloudServiceBinding getServiceBindingForApplication(UUID applicationId, UUID serviceInstanceGuid)
- Specified by:
getServiceBindingForApplicationin interfaceCloudControllerRestClient
-
getServiceBroker
public CloudServiceBroker getServiceBroker(String name)
- Specified by:
getServiceBrokerin interfaceCloudControllerRestClient
-
getServiceBroker
public CloudServiceBroker getServiceBroker(String name, boolean required)
- Specified by:
getServiceBrokerin interfaceCloudControllerRestClient
-
getServiceBrokers
public List<CloudServiceBroker> getServiceBrokers()
- Specified by:
getServiceBrokersin interfaceCloudControllerRestClient
-
getServiceKey
public CloudServiceKey getServiceKey(String serviceInstanceName, String serviceKeyName)
- Specified by:
getServiceKeyin interfaceCloudControllerRestClient
-
getServiceKeys
public List<CloudServiceKey> getServiceKeys(String serviceInstanceName)
- Specified by:
getServiceKeysin interfaceCloudControllerRestClient
-
getServiceKeysWithCredentials
public List<CloudServiceKey> getServiceKeysWithCredentials(String serviceInstanceName)
- Specified by:
getServiceKeysWithCredentialsin interfaceCloudControllerRestClient
-
getServiceKeys
public List<CloudServiceKey> getServiceKeys(CloudServiceInstance serviceInstance)
- Specified by:
getServiceKeysin interfaceCloudControllerRestClient
-
getServiceKeysWithCredentials
public List<CloudServiceKey> getServiceKeysWithCredentials(CloudServiceInstance serviceInstance)
- Specified by:
getServiceKeysWithCredentialsin interfaceCloudControllerRestClient
-
getServiceInstanceParameters
public Map<String,Object> getServiceInstanceParameters(UUID guid)
- Specified by:
getServiceInstanceParametersin interfaceCloudControllerRestClient
-
getUserProvidedServiceInstanceParameters
public Map<String,Object> getUserProvidedServiceInstanceParameters(UUID guid)
- Specified by:
getUserProvidedServiceInstanceParametersin interfaceCloudControllerRestClient
-
getServiceBindingParameters
public Map<String,Object> getServiceBindingParameters(UUID guid)
- Specified by:
getServiceBindingParametersin interfaceCloudControllerRestClient
-
getServiceOfferings
public List<CloudServiceOffering> getServiceOfferings()
- Specified by:
getServiceOfferingsin interfaceCloudControllerRestClient
-
updateServicePlan
public void updateServicePlan(String serviceName, String planName)
- Specified by:
updateServicePlanin interfaceCloudControllerRestClient
-
getServiceInstanceName
public String getServiceInstanceName(UUID serviceInstanceGuid)
- Specified by:
getServiceInstanceNamein interfaceCloudControllerRestClient
-
getServiceInstanceWithoutAuxiliaryContent
public CloudServiceInstance getServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName)
- Specified by:
getServiceInstanceWithoutAuxiliaryContentin interfaceCloudControllerRestClient
-
getServiceInstanceWithoutAuxiliaryContent
public CloudServiceInstance getServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName, boolean required)
- Specified by:
getServiceInstanceWithoutAuxiliaryContentin interfaceCloudControllerRestClient
-
updateServiceParameters
public void updateServiceParameters(String serviceName, Map<String,Object> parameters)
- Specified by:
updateServiceParametersin interfaceCloudControllerRestClient
-
updateServiceTags
public void updateServiceTags(String serviceName, List<String> tags)
- Specified by:
updateServiceTagsin interfaceCloudControllerRestClient
-
updateServiceSyslogDrainUrl
public void updateServiceSyslogDrainUrl(String serviceName, String syslogDrainUrl)
- Specified by:
updateServiceSyslogDrainUrlin interfaceCloudControllerRestClient
-
getServiceInstancesWithoutAuxiliaryContentByNames
public List<CloudServiceInstance> getServiceInstancesWithoutAuxiliaryContentByNames(List<String> names)
- Specified by:
getServiceInstancesWithoutAuxiliaryContentByNamesin interfaceCloudControllerRestClient
-
getServiceInstancesByMetadataLabelSelector
public List<CloudServiceInstance> getServiceInstancesByMetadataLabelSelector(String labelSelector)
- Specified by:
getServiceInstancesByMetadataLabelSelectorin interfaceCloudControllerRestClient
-
getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelector
public List<CloudServiceInstance> getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelector(String labelSelector)
- Specified by:
getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelectorin interfaceCloudControllerRestClient
-
getStack
public CloudStack getStack(String name)
- Specified by:
getStackin interfaceCloudControllerRestClient
-
getStack
public CloudStack getStack(String name, boolean required)
- Specified by:
getStackin interfaceCloudControllerRestClient
-
getStacks
public List<CloudStack> getStacks()
- Specified by:
getStacksin interfaceCloudControllerRestClient
-
rename
public void rename(String applicationName, String newName)
- Specified by:
renamein interfaceCloudControllerRestClient
-
restartApplication
public void restartApplication(String applicationName)
- Specified by:
restartApplicationin interfaceCloudControllerRestClient
-
startApplication
public void startApplication(String applicationName)
- Specified by:
startApplicationin interfaceCloudControllerRestClient
-
stopApplication
public void stopApplication(String applicationName)
- Specified by:
stopApplicationin interfaceCloudControllerRestClient
-
unbindServiceInstance
public Optional<String> unbindServiceInstance(String applicationName, String serviceInstanceName)
- Specified by:
unbindServiceInstancein interfaceCloudControllerRestClient
-
deleteServiceBinding
public Optional<String> deleteServiceBinding(UUID serviceBindingGuid)
- Specified by:
deleteServiceBindingin interfaceCloudControllerRestClient
-
unbindServiceInstance
public Optional<String> unbindServiceInstance(UUID applicationGuid, UUID serviceInstanceGuid)
- Specified by:
unbindServiceInstancein interfaceCloudControllerRestClient
-
updateApplicationDiskQuota
public void updateApplicationDiskQuota(String applicationName, int diskQuota)
- Specified by:
updateApplicationDiskQuotain interfaceCloudControllerRestClient
-
updateApplicationEnv
public void updateApplicationEnv(String applicationName, Map<String,String> env)
- Specified by:
updateApplicationEnvin interfaceCloudControllerRestClient
-
updateApplicationInstances
public void updateApplicationInstances(String applicationName, int instances)
- Specified by:
updateApplicationInstancesin interfaceCloudControllerRestClient
-
updateApplicationMemory
public void updateApplicationMemory(String applicationName, int memory)
- Specified by:
updateApplicationMemoryin interfaceCloudControllerRestClient
-
updateApplicationMetadata
public void updateApplicationMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateApplicationMetadatain interfaceCloudControllerRestClient
-
updateApplicationStaging
public void updateApplicationStaging(String applicationName, Staging staging)
- Specified by:
updateApplicationStagingin interfaceCloudControllerRestClient
-
updateApplicationRoutes
public void updateApplicationRoutes(String applicationName, Set<CloudRoute> updatedRoutes)
- Specified by:
updateApplicationRoutesin interfaceCloudControllerRestClient
-
updateServiceBroker
public String updateServiceBroker(CloudServiceBroker serviceBroker)
- Specified by:
updateServiceBrokerin interfaceCloudControllerRestClient
-
updateServiceInstanceMetadata
public void updateServiceInstanceMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateServiceInstanceMetadatain interfaceCloudControllerRestClient
-
updateServiceBindingMetadata
public void updateServiceBindingMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateServiceBindingMetadatain interfaceCloudControllerRestClient
-
updateServicePlanVisibilityForBroker
public void updateServicePlanVisibilityForBroker(String name, ServicePlanVisibility visibility)
- Specified by:
updateServicePlanVisibilityForBrokerin interfaceCloudControllerRestClient
-
getTask
public CloudTask getTask(UUID taskGuid)
- Specified by:
getTaskin interfaceCloudControllerRestClient
-
getTasks
public List<CloudTask> getTasks(String applicationName)
- Specified by:
getTasksin interfaceCloudControllerRestClient
-
runTask
public CloudTask runTask(String applicationName, CloudTask task)
- Specified by:
runTaskin interfaceCloudControllerRestClient
-
cancelTask
public CloudTask cancelTask(UUID taskGuid)
- Specified by:
cancelTaskin interfaceCloudControllerRestClient
-
asyncUploadApplication
public CloudPackage asyncUploadApplication(String applicationName, Path file, UploadStatusCallback callback)
- Specified by:
asyncUploadApplicationin interfaceCloudControllerRestClient
-
getUploadStatus
public Upload getUploadStatus(UUID packageGuid)
- Specified by:
getUploadStatusin interfaceCloudControllerRestClient
-
getBuild
public CloudBuild getBuild(UUID buildGuid)
- Specified by:
getBuildin interfaceCloudControllerRestClient
-
getBuildsForApplication
public List<CloudBuild> getBuildsForApplication(UUID applicationGuid)
- Specified by:
getBuildsForApplicationin interfaceCloudControllerRestClient
-
getBuildsForPackage
public List<CloudBuild> getBuildsForPackage(UUID packageGuid)
- Specified by:
getBuildsForPackagein interfaceCloudControllerRestClient
-
createBuild
public CloudBuild createBuild(UUID packageGuid)
- Specified by:
createBuildin interfaceCloudControllerRestClient
-
bindDropletToApp
public void bindDropletToApp(UUID dropletGuid, UUID applicationGuid)
- Specified by:
bindDropletToAppin interfaceCloudControllerRestClient
-
getCurrentDropletForApplication
public DropletInfo getCurrentDropletForApplication(UUID applicationGuid)
- Specified by:
getCurrentDropletForApplicationin interfaceCloudControllerRestClient
-
getPackagesForApplication
public List<CloudPackage> getPackagesForApplication(UUID applicationGuid)
- Specified by:
getPackagesForApplicationin interfaceCloudControllerRestClient
-
getUserRolesBySpaceAndUser
public Set<UserRole> getUserRolesBySpaceAndUser(UUID spaceGuid, UUID userGuid)
- Specified by:
getUserRolesBySpaceAndUserin interfaceCloudControllerRestClient
-
createDockerPackage
public CloudPackage createDockerPackage(UUID applicationGuid, DockerInfo dockerInfo)
- Specified by:
createDockerPackagein interfaceCloudControllerRestClient
-
getAsyncJob
public CloudAsyncJob getAsyncJob(String jobId)
- Specified by:
getAsyncJobin interfaceCloudControllerRestClient
-
getServiceOffering
protected reactor.core.publisher.Mono<? extends org.cloudfoundry.client.v3.serviceofferings.ServiceOffering> getServiceOffering(String offeringId)
-
getServicePlanResource
protected reactor.core.publisher.Mono<? extends org.cloudfoundry.client.v3.serviceplans.ServicePlan> getServicePlanResource(String servicePlanGuid, String serviceInstanceName)
-
getPackage
public CloudPackage getPackage(UUID packageGuid)
- Specified by:
getPackagein interfaceCloudControllerRestClient
-
-