use of org.eclipse.che.api.workspace.shared.event.WorkspaceRemovedEvent in project devspaces-images by redhat-developer.
the class JpaWorkspaceDao method remove.
@Override
public Optional<WorkspaceImpl> remove(String id) throws ServerException {
requireNonNull(id, "Required non-null id");
Optional<WorkspaceImpl> workspaceOpt;
try {
workspaceOpt = doRemove(id);
workspaceOpt.ifPresent(workspace -> eventService.publish(new WorkspaceRemovedEvent(workspace)));
} catch (RuntimeException x) {
throw new ServerException(x.getLocalizedMessage(), x);
}
return workspaceOpt;
}
use of org.eclipse.che.api.workspace.shared.event.WorkspaceRemovedEvent in project che-server by eclipse-che.
the class MultiuserJpaWorkspaceDao method remove.
@Override
public Optional<WorkspaceImpl> remove(String id) throws ServerException {
requireNonNull(id, "Required non-null id");
Optional<WorkspaceImpl> workspaceOpt;
try {
workspaceOpt = doRemove(id);
workspaceOpt.ifPresent(workspace -> eventService.publish(new WorkspaceRemovedEvent(workspace)));
} catch (RuntimeException x) {
throw new ServerException(x.getLocalizedMessage(), x);
}
return workspaceOpt;
}
use of org.eclipse.che.api.workspace.shared.event.WorkspaceRemovedEvent in project devspaces-images by redhat-developer.
the class MultiuserJpaWorkspaceDao method remove.
@Override
public Optional<WorkspaceImpl> remove(String id) throws ServerException {
requireNonNull(id, "Required non-null id");
Optional<WorkspaceImpl> workspaceOpt;
try {
workspaceOpt = doRemove(id);
workspaceOpt.ifPresent(workspace -> eventService.publish(new WorkspaceRemovedEvent(workspace)));
} catch (RuntimeException x) {
throw new ServerException(x.getLocalizedMessage(), x);
}
return workspaceOpt;
}
Aggregations