org.cloudfoundry.client.lib.rest.CloudControllerRestClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudfoundry-client-lib Show documentation
Show all versions of cloudfoundry-client-lib Show documentation
A Cloud Foundry client library for Java
The newest version!
/*
* Copyright 2009-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cloudfoundry.client.lib.rest;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.cloudfoundry.client.lib.StartingInfo;
import org.cloudfoundry.client.lib.UploadStatusCallback;
import org.cloudfoundry.client.lib.domain.ApplicationLog;
import org.cloudfoundry.client.lib.domain.CloudApplication;
import org.cloudfoundry.client.lib.domain.CloudBuild;
import org.cloudfoundry.client.lib.domain.CloudDomain;
import org.cloudfoundry.client.lib.domain.CloudEvent;
import org.cloudfoundry.client.lib.domain.CloudInfo;
import org.cloudfoundry.client.lib.domain.CloudOrganization;
import org.cloudfoundry.client.lib.domain.CloudPackage;
import org.cloudfoundry.client.lib.domain.CloudRoute;
import org.cloudfoundry.client.lib.domain.CloudServiceBinding;
import org.cloudfoundry.client.lib.domain.CloudServiceBroker;
import org.cloudfoundry.client.lib.domain.CloudServiceInstance;
import org.cloudfoundry.client.lib.domain.CloudServiceKey;
import org.cloudfoundry.client.lib.domain.CloudServiceOffering;
import org.cloudfoundry.client.lib.domain.CloudSpace;
import org.cloudfoundry.client.lib.domain.CloudStack;
import org.cloudfoundry.client.lib.domain.CloudTask;
import org.cloudfoundry.client.lib.domain.DockerInfo;
import org.cloudfoundry.client.lib.domain.DropletInfo;
import org.cloudfoundry.client.lib.domain.InstancesInfo;
import org.cloudfoundry.client.lib.domain.Staging;
import org.cloudfoundry.client.lib.domain.Upload;
import org.cloudfoundry.client.lib.oauth2.OAuthClient;
import org.cloudfoundry.client.v3.Metadata;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.web.client.ResponseErrorHandler;
import org.springframework.web.reactive.function.client.WebClient;
/**
* Interface defining operations available for the cloud controller REST client implementations
*
* @author Thomas Risberg
*/
public interface CloudControllerRestClient {
void addDomain(String domainName);
void addRoute(String host, String domainName, String path);
void bindServiceInstance(String applicationName, String serviceInstanceName);
void bindServiceInstance(String applicationName, String serviceInstanceName, Map parameters);
void createApplication(String applicationName, Staging staging, Integer memory, List uris);
void createApplication(String applicationName, Staging staging, Integer disk, Integer memory, List uris, DockerInfo dockerInfo);
void createServiceInstance(CloudServiceInstance serviceInstance);
void createServiceBroker(CloudServiceBroker serviceBroker);
CloudServiceKey createServiceKey(String serviceInstanceName, String serviceKeyName, Map parameters);
void createUserProvidedServiceInstance(CloudServiceInstance serviceInstance, Map credentials);
void createUserProvidedServiceInstance(CloudServiceInstance serviceInstance, Map credentials, String syslogDrainUrl);
void deleteAllApplications();
void deleteAllServiceInstances();
void deleteApplication(String applicationName);
void deleteDomain(String domainName);
List deleteOrphanedRoutes();
void deleteRoute(String host, String domainName, String path);
void deleteServiceInstance(String serviceInstanceName);
void deleteServiceInstance(CloudServiceInstance serviceInstance);
void deleteServiceBroker(String name);
void deleteServiceKey(String serviceInstanceName, String serviceKeyName);
void deleteServiceKey(CloudServiceKey serviceKey);
CloudApplication getApplication(String applicationName);
CloudApplication getApplication(String applicationName, boolean required);
CloudApplication getApplication(UUID applicationGuid);
Map getApplicationEnvironment(UUID applicationGuid);
Map getApplicationEnvironment(String applicationName);
List getApplicationEvents(String applicationName);
List getEventsByActee(UUID uuid);
InstancesInfo getApplicationInstances(String applicationName);
InstancesInfo getApplicationInstances(CloudApplication app);
List getApplications();
URL getControllerUrl();
CloudDomain getDefaultDomain();
List getDomains();
List getDomainsForOrganization();
List getEvents();
CloudInfo getInfo();
CloudOrganization getOrganization(String organizationName);
CloudOrganization getOrganization(String organizationName, boolean required);
List getOrganizations();
List getPrivateDomains();
List getRecentLogs(String applicationName);
List getRecentLogs(UUID applicationGuid);
List getRoutes(String domainName);
CloudServiceInstance getServiceInstance(String serviceInstanceName);
CloudServiceInstance getServiceInstance(String serviceInstanceName, boolean required);
List getServiceBindings(UUID serviceInstanceGuid);
CloudServiceBroker getServiceBroker(String name);
CloudServiceBroker getServiceBroker(String name, boolean required);
List getServiceBrokers();
List getServiceKeys(String serviceInstanceName);
List getServiceKeys(CloudServiceInstance serviceInstance);
List getServiceOfferings();
List getServiceInstances();
List getSharedDomains();
CloudSpace getSpace(UUID spaceGuid);
CloudSpace getSpace(String organizationName, String spaceName);
CloudSpace getSpace(String organizationName, String spaceName, boolean required);
CloudSpace getSpace(String spaceName);
CloudSpace getSpace(String spaceName, boolean required);
List getSpaceAuditors();
List getSpaceAuditors(String spaceName);
List getSpaceAuditors(String organizationName, String spaceName);
List getSpaceAuditors(UUID spaceGuid);
List getSpaceDevelopers();
List getSpaceDevelopers(String spaceName);
List getSpaceDevelopers(String organizationName, String spaceName);
List getSpaceDevelopers(UUID spaceGuid);
List getSpaceManagers();
List getSpaceManagers(String spaceName);
List getSpaceManagers(String organizationName, String spaceName);
List getSpaceManagers(UUID spaceGuid);
List getSpaces();
List getSpaces(String organizationName);
CloudStack getStack(String name);
CloudStack getStack(String name, boolean required);
List getStacks();
OAuth2AccessToken login();
void logout();
void rename(String applicationName, String newName);
StartingInfo restartApplication(String applicationName);
StartingInfo startApplication(String applicationName);
void stopApplication(String applicationName);
void unbindServiceInstance(String applicationName, String serviceInstanceName);
void unbindServiceInstance(CloudApplication application, CloudServiceInstance serviceInstance);
void updateApplicationDiskQuota(String applicationName, int disk);
void updateApplicationEnv(String applicationName, Map env);
void updateApplicationInstances(String applicationName, int instances);
void updateApplicationMemory(String applicationName, int memory);
void updateApplicationStaging(String applicationName, Staging staging);
void updateApplicationUris(String applicationName, List uris);
void updateServiceBroker(CloudServiceBroker serviceBroker);
void updateServicePlanVisibilityForBroker(String name, boolean visibility);
void updateServicePlan(String serviceName, String planName);
void updateServiceParameters(String serviceName, Map parameters);
void updateServiceTags(String serviceName, List tags);
void uploadApplication(String applicationName, Path file, UploadStatusCallback callback);
void uploadApplication(String applicationName, InputStream inputStream, UploadStatusCallback callback) throws IOException;
CloudPackage asyncUploadApplication(String applicationName, Path file, UploadStatusCallback callback);
Upload getUploadStatus(UUID packageGuid);
CloudTask getTask(UUID taskGuid);
List getTasks(String applicationName);
CloudTask runTask(String applicationName, CloudTask task);
CloudTask cancelTask(UUID taskGuid);
CloudBuild createBuild(UUID packageGuid);
CloudBuild getBuild(UUID packageGuid);
void bindDropletToApp(UUID dropletGuid, UUID applicationGuid);
List getBuildsForApplication(UUID applicationGuid);
WebClient getWebClient();
OAuthClient getOAuthClient();
Map getServiceInstanceParameters(UUID guid);
Map getServiceBindingParameters(UUID guid);
List getBuildsForPackage(UUID packageGuid);
List getApplicationsByMetadataLabelSelector(String labelSelector);
List getServiceInstancesByMetadataLabelSelector(String labelSelector);
void updateApplicationMetadata(UUID guid, Metadata metadata);
void updateServiceInstanceMetadata(UUID guid, Metadata metadata);
DropletInfo getCurrentDropletForApplication(UUID applicationGuid);
CloudPackage getPackage(UUID packageGuid);
List getPackagesForApplication(UUID applicationGuid);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy