use of org.bimserver.notifications.ProgressTopic in project BIMserver by opensourceBIM.
the class NotificationRegistryServiceImpl method unregisterProgressHandler.
@Override
public void unregisterProgressHandler(Long topicId, Long endPointId) throws UserException, ServerException {
EndPoint endPoint = getEndPoint(endPointId);
ProgressTopic progressTopic = getBimServer().getNotificationsManager().getProgressTopic(topicId);
if (progressTopic == null) {
throw new UserException("Topic with id " + topicId + " not found");
}
try {
progressTopic.unregister(endPoint);
} catch (TopicRegisterException e) {
handleException(e);
}
}
use of org.bimserver.notifications.ProgressTopic in project BIMserver by opensourceBIM.
the class NotificationRegistryServiceImpl method updateProgressTopic.
@Override
public void updateProgressTopic(Long topicId, SLongActionState state) throws UserException, ServerException {
try {
ProgressTopic topic = getBimServer().getNotificationsManager().getProgressTopic(topicId);
ProgressNotification progressNotification;
progressNotification = new ProgressNotification(getBimServer(), topic, getBimServer().getSConverter().convertFromSObject(state));
getBimServer().getNotificationsManager().addToQueue(progressNotification);
} catch (BimserverDatabaseException e) {
throw new ServerException(e);
}
}
Aggregations