Search in sources :

Example 1 with ChangeProgressTopicOnProjectTopic

use of org.bimserver.notifications.ChangeProgressTopicOnProjectTopic in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method registerChangeProgressOnProject.

@Override
public void registerChangeProgressOnProject(Long endPointId, Long poid) throws ServerException, UserException {
    if (endPointId == null) {
        throw new UserException("No endpoint given");
    }
    ChangeProgressTopicOnProjectTopic changeProgressOnProjectTopic = getBimServer().getNotificationsManager().getChangeProgressOnProjectTopic(poid);
    EndPoint endPoint = getEndPoint(endPointId);
    try {
        changeProgressOnProjectTopic.register(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : TopicRegisterException(org.bimserver.notifications.TopicRegisterException) UserException(org.bimserver.shared.exceptions.UserException) EndPoint(org.bimserver.endpoints.EndPoint) ChangeProgressTopicOnProjectTopic(org.bimserver.notifications.ChangeProgressTopicOnProjectTopic)

Example 2 with ChangeProgressTopicOnProjectTopic

use of org.bimserver.notifications.ChangeProgressTopicOnProjectTopic in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method unregisterChangeProgressOnProject.

@Override
public void unregisterChangeProgressOnProject(Long endPointId, Long poid) throws ServerException, UserException {
    ChangeProgressTopicOnProjectTopic changeProgressOnProjectTopic = getBimServer().getNotificationsManager().getChangeProgressOnProjectTopic(poid);
    EndPoint endPoint = getEndPoint(endPointId);
    try {
        changeProgressOnProjectTopic.unregister(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : TopicRegisterException(org.bimserver.notifications.TopicRegisterException) EndPoint(org.bimserver.endpoints.EndPoint) ChangeProgressTopicOnProjectTopic(org.bimserver.notifications.ChangeProgressTopicOnProjectTopic)

Aggregations

EndPoint (org.bimserver.endpoints.EndPoint)2 ChangeProgressTopicOnProjectTopic (org.bimserver.notifications.ChangeProgressTopicOnProjectTopic)2 TopicRegisterException (org.bimserver.notifications.TopicRegisterException)2 UserException (org.bimserver.shared.exceptions.UserException)1