Search in sources :

Example 1 with EntityNotFoundException

use of com.hortonworks.streamline.streams.cluster.exception.EntityNotFoundException in project streamline by hortonworks.

the class EnvironmentService method updateServiceBundle.

public ServiceBundle updateServiceBundle(String serviceName, ServiceBundle serviceBundle) throws EntityNotFoundException {
    ServiceBundle persistentServiceBundle = getServiceBundleByName(serviceName);
    if (persistentServiceBundle == null)
        throw new EntityNotFoundException(String.format("Unable to find a service bundle of name : \"%s\"", serviceName));
    persistentServiceBundle.setRegisterClass(serviceBundle.getRegisterClass());
    persistentServiceBundle.setServiceUISpecification(serviceBundle.getServiceUISpecification());
    persistentServiceBundle.setTimestamp(System.currentTimeMillis());
    dao.update(persistentServiceBundle);
    return persistentServiceBundle;
}
Also used : ServiceBundle(com.hortonworks.streamline.streams.cluster.catalog.ServiceBundle) EntityNotFoundException(com.hortonworks.streamline.streams.cluster.exception.EntityNotFoundException)

Aggregations

ServiceBundle (com.hortonworks.streamline.streams.cluster.catalog.ServiceBundle)1 EntityNotFoundException (com.hortonworks.streamline.streams.cluster.exception.EntityNotFoundException)1