-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathServiceInstanceService.java
57 lines (50 loc) · 2.6 KB
/
ServiceInstanceService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package org.cloudfoundry.community.servicebroker.service;
import org.cloudfoundry.community.servicebroker.exception.*;
import org.cloudfoundry.community.servicebroker.model.*;
/**
* Handles instances of service definitions.
*
* @author sgreenberg@gopivotal.com
*/
public interface ServiceInstanceService {
/**
* Create a new instance of a service
* @param createServiceInstanceRequest containing the parameters from CloudController
* @return The newly created ServiceInstance
* @throws ServiceInstanceExistsException if the service instance already exists.
* @throws ServiceBrokerException if something goes wrong internally
* @throws ServiceBrokerAsyncRequiredException if we must use an async comparable cloud controller
*/
ServiceInstance createServiceInstance(CreateServiceInstanceRequest createServiceInstanceRequest)
throws ServiceInstanceExistsException, ServiceBrokerException, ServiceBrokerAsyncRequiredException;
/**
* @param serviceInstanceId The id of the serviceInstance
* @return The ServiceInstance with the given id or null if one does not exist
*/
ServiceInstance getServiceInstance(String serviceInstanceId);
/**
* Delete and return the instance if it exists.
* @param deleteServiceInstanceRequest containing pertinent information for deleting the service.
* @return The deleted ServiceInstance or null if one did not exist.
* @throws ServiceBrokerException is something goes wrong internally
* @throws ServiceBrokerAsyncRequiredException if we must use an async comparable cloud controller
*
*/
ServiceInstance deleteServiceInstance(DeleteServiceInstanceRequest deleteServiceInstanceRequest)
throws ServiceBrokerException, ServiceBrokerAsyncRequiredException;
/**
* Update a service instance. Only modification of service plan is supported.
* @param updateServiceInstanceRequest detailing the request parameters
*
* @return The updated serviceInstance
* @throws ServiceInstanceUpdateNotSupportedException if particular plan change is not supported
* or if the request can not currently be fulfilled due to the state of the instance.
* @throws ServiceInstanceDoesNotExistException if the service instance does not exist
* @throws ServiceBrokerException if something goes wrong internally
* @throws ServiceBrokerAsyncRequiredException if we must use an async comparable cloud controller
*
*/
ServiceInstance updateServiceInstance(UpdateServiceInstanceRequest updateServiceInstanceRequest)
throws ServiceInstanceUpdateNotSupportedException, ServiceBrokerException,
ServiceInstanceDoesNotExistException, ServiceBrokerAsyncRequiredException;
}