Search in sources :

Example 1 with EndPoint

use of org.bimserver.endpoints.EndPoint in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method registerNewRevisionOnSpecificProjectHandler.

@Override
public void registerNewRevisionOnSpecificProjectHandler(Long endPointId, Long poid) throws ServerException, UserException {
    EndPoint endPoint = getEndPoint(endPointId);
    NewRevisionOnSpecificProjectTopic newRevisionOnSpecificProjectTopic = getBimServer().getNotificationsManager().getOrCreateNewRevisionOnSpecificProjectTopic(new NewRevisionOnSpecificProjectTopicKey(poid));
    try {
        newRevisionOnSpecificProjectTopic.register(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : TopicRegisterException(org.bimserver.notifications.TopicRegisterException) NewRevisionOnSpecificProjectTopic(org.bimserver.notifications.NewRevisionOnSpecificProjectTopic) NewRevisionOnSpecificProjectTopicKey(org.bimserver.notifications.NewRevisionOnSpecificProjectTopicKey) EndPoint(org.bimserver.endpoints.EndPoint)

Example 2 with EndPoint

use of org.bimserver.endpoints.EndPoint in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method registerNewRevisionHandler.

@Override
public void registerNewRevisionHandler(Long endPointId) throws ServerException, UserException {
    EndPoint endPoint = getEndPoint(endPointId);
    NewRevisionTopic newRevisionTopic = getBimServer().getNotificationsManager().getNewRevisionTopic();
    try {
        newRevisionTopic.register(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : TopicRegisterException(org.bimserver.notifications.TopicRegisterException) EndPoint(org.bimserver.endpoints.EndPoint) NewRevisionTopic(org.bimserver.notifications.NewRevisionTopic)

Example 3 with EndPoint

use of org.bimserver.endpoints.EndPoint 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 4 with EndPoint

use of org.bimserver.endpoints.EndPoint in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method registerNewExtendedDataOnRevisionHandler.

@Override
public void registerNewExtendedDataOnRevisionHandler(Long endPointId, Long roid) throws ServerException, UserException {
    EndPoint endPoint = getEndPoint(endPointId);
    NewExtendedDataOnRevisionTopic topic = getBimServer().getNotificationsManager().getOrCreateNewExtendedDataOnRevisionTopic(new NewExtendedDataOnRevisionTopicKey(roid));
    try {
        topic.register(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : NewExtendedDataOnRevisionTopicKey(org.bimserver.notifications.NewExtendedDataOnRevisionTopicKey) TopicRegisterException(org.bimserver.notifications.TopicRegisterException) NewExtendedDataOnRevisionTopic(org.bimserver.notifications.NewExtendedDataOnRevisionTopic) EndPoint(org.bimserver.endpoints.EndPoint)

Example 5 with EndPoint

use of org.bimserver.endpoints.EndPoint in project BIMserver by opensourceBIM.

the class NotificationRegistryServiceImpl method unregisterChangeProgressOnServer.

@Override
public void unregisterChangeProgressOnServer(Long endPointId) throws ServerException, UserException {
    ChangeProgressTopicOnServerTopic changeProgressTopicOnServerTopic = getBimServer().getNotificationsManager().getChangeProgressTopicOnServerTopic();
    EndPoint endPoint = getEndPoint(endPointId);
    try {
        changeProgressTopicOnServerTopic.unregister(endPoint);
    } catch (TopicRegisterException e) {
        handleException(e);
    }
}
Also used : TopicRegisterException(org.bimserver.notifications.TopicRegisterException) ChangeProgressTopicOnServerTopic(org.bimserver.notifications.ChangeProgressTopicOnServerTopic) EndPoint(org.bimserver.endpoints.EndPoint)

Aggregations

EndPoint (org.bimserver.endpoints.EndPoint)14 TopicRegisterException (org.bimserver.notifications.TopicRegisterException)11 UserException (org.bimserver.shared.exceptions.UserException)6 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)2 ChangeProgressTopicOnProjectTopic (org.bimserver.notifications.ChangeProgressTopicOnProjectTopic)2 ChangeProgressTopicOnRevisionTopic (org.bimserver.notifications.ChangeProgressTopicOnRevisionTopic)2 ChangeProgressTopicOnServerTopic (org.bimserver.notifications.ChangeProgressTopicOnServerTopic)2 ProgressTopic (org.bimserver.notifications.ProgressTopic)2 ServerException (org.bimserver.shared.exceptions.ServerException)2 JsonParseException (com.fasterxml.jackson.core.JsonParseException)1 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 ByteBuffer (java.nio.ByteBuffer)1 LinkedHashSet (java.util.LinkedHashSet)1 ServletException (javax.servlet.ServletException)1