use of org.eclipse.che.api.devfile.server.event.BeforeDevfileRemovedEvent in project che-server by eclipse-che.
the class JpaUserDevfileDao method doRemove.
@Transactional(rollbackOn = { RuntimeException.class, ServerException.class })
protected void doRemove(String id) throws ServerException {
final EntityManager manager = managerProvider.get();
final UserDevfileImpl devfile = manager.find(UserDevfileImpl.class, id);
if (devfile != null) {
eventService.publish(new BeforeDevfileRemovedEvent(new UserDevfileImpl(devfile))).propagateException();
manager.remove(devfile);
manager.flush();
}
}
use of org.eclipse.che.api.devfile.server.event.BeforeDevfileRemovedEvent in project devspaces-images by redhat-developer.
the class JpaUserDevfileDao method doRemove.
@Transactional(rollbackOn = { RuntimeException.class, ServerException.class })
protected void doRemove(String id) throws ServerException {
final EntityManager manager = managerProvider.get();
final UserDevfileImpl devfile = manager.find(UserDevfileImpl.class, id);
if (devfile != null) {
eventService.publish(new BeforeDevfileRemovedEvent(new UserDevfileImpl(devfile))).propagateException();
manager.remove(devfile);
manager.flush();
}
}
Aggregations