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;
}
Aggregations