Search in sources :

Example 1 with ManagedServiceUnbindEvent

use of org.alien4cloud.alm.events.ManagedServiceUnbindEvent in project alien4cloud by alien4cloud.

the class ManagedServiceResourceService method unbind.

/**
 * Unbind the service resource from the application environment
 *
 * Note that the service will still exists, but will only be updatable via service api
 *
 * @param environmentId The environment for which to get the service resource.
 */
public void unbind(String environmentId) {
    ServiceResource serviceResource = getOrFail(environmentId);
    serviceResource.setEnvironmentId(null);
    serviceResourceService.save(serviceResource);
    publisher.publishEvent(new ManagedServiceUnbindEvent(this, serviceResource));
}
Also used : ManagedServiceUnbindEvent(org.alien4cloud.alm.events.ManagedServiceUnbindEvent) ServiceResource(alien4cloud.model.service.ServiceResource)

Aggregations

ServiceResource (alien4cloud.model.service.ServiceResource)1 ManagedServiceUnbindEvent (org.alien4cloud.alm.events.ManagedServiceUnbindEvent)1