use of org.bimserver.interfaces.objects.SExtendedDataAddedToRevision in project BIMserver by opensourceBIM.
the class ServiceImpl method triggerNewExtendedData.
@Override
public void triggerNewExtendedData(Long edid, Long soid) throws ServerException, UserException {
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.POSSIBLY_WRITE);
try {
ExtendedData extendedData = (ExtendedData) session.get(StorePackage.eINSTANCE.getExtendedData(), edid, OldQuery.getDefault());
SExtendedDataAddedToRevision newExtendedData = new SExtendedDataAddedToRevision();
newExtendedData.setRevisionId(extendedData.getRevision().getOid());
newExtendedData.setExtendedDataId(edid);
getBimServer().getNotificationsManager().notify(new NewExtendedDataOnRevisionNotification(getBimServer(), edid, extendedData.getRevision().getProject().getOid(), extendedData.getRevision().getOid(), soid));
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations