Search in sources :

Example 16 with OldQuery

use of org.bimserver.database.OldQuery in project BIMserver by opensourceBIM.

the class GetDataObjectByOidDatabaseAction method execute.

@Override
public DataObject execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
    Revision virtualRevision = getRevisionByRoid(roid);
    EObject eObject = null;
    IfcModelSet ifcModelSet = new IfcModelSet();
    PackageMetaData lastPackageMetaData = null;
    Map<Integer, Long> pidRoidMap = new HashMap<>();
    pidRoidMap.put(virtualRevision.getProject().getId(), virtualRevision.getOid());
    for (ConcreteRevision concreteRevision : virtualRevision.getConcreteRevisions()) {
        PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(concreteRevision.getProject().getSchema());
        lastPackageMetaData = packageMetaData;
        IfcModel subModel = new BasicIfcModel(packageMetaData, pidRoidMap);
        int highestStopId = findHighestStopRid(concreteRevision.getProject(), concreteRevision);
        OldQuery query = new OldQuery(packageMetaData, concreteRevision.getProject().getId(), concreteRevision.getId(), virtualRevision.getOid(), Deep.NO, highestStopId);
        eObject = getDatabaseSession().get(null, oid, subModel, query);
        subModel.getModelMetaData().setDate(concreteRevision.getDate());
        ifcModelSet.add(subModel);
        if (eObject != null) {
            break;
        }
    }
    IfcModelInterface ifcModel = new BasicIfcModel(lastPackageMetaData, pidRoidMap);
    if (ifcModelSet.size() > 1) {
        try {
            ifcModel = getBimServer().getMergerFactory().createMerger(getDatabaseSession(), getAuthorization().getUoid()).merge(virtualRevision.getProject(), ifcModelSet, new ModelHelper(getBimServer().getMetaDataManager(), ifcModel));
        } catch (MergeException e) {
            throw new UserException(e);
        }
    } else {
        ifcModel = ifcModelSet.iterator().next();
    }
    if (eObject == null) {
        throw new UserException("Object not found in this project/revision");
    }
    DataObject dataObject = null;
    if (eObject instanceof IfcRoot) {
        IfcRoot ifcRoot = (IfcRoot) eObject;
        String guid = ifcRoot.getGlobalId() != null ? ifcRoot.getGlobalId() : "";
        String name = ifcRoot.getName() != null ? ifcRoot.getName() : "";
        dataObject = StoreFactory.eINSTANCE.createDataObject();
        dataObject.setType(eObject.eClass().getName());
        ((IdEObjectImpl) dataObject).setOid(oid);
        dataObject.setGuid(guid);
        dataObject.setName(name);
    } else {
        dataObject = StoreFactory.eINSTANCE.createDataObject();
        dataObject.setType(eObject.eClass().getName());
        ((IdEObjectImpl) dataObject).setOid(oid);
        dataObject.setName("");
        dataObject.setGuid("");
    }
    fillDataObject(ifcModel.getObjects(), eObject, dataObject);
    return dataObject;
}
Also used : IdEObjectImpl(org.bimserver.emf.IdEObjectImpl) ModelHelper(org.bimserver.plugins.ModelHelper) HashMap(java.util.HashMap) PackageMetaData(org.bimserver.emf.PackageMetaData) IfcModelInterface(org.bimserver.emf.IfcModelInterface) IfcRoot(org.bimserver.models.ifc2x3tc1.IfcRoot) BasicIfcModel(org.bimserver.ifc.BasicIfcModel) OldQuery(org.bimserver.database.OldQuery) BasicIfcModel(org.bimserver.ifc.BasicIfcModel) IfcModel(org.bimserver.ifc.IfcModel) DataObject(org.bimserver.models.store.DataObject) Revision(org.bimserver.models.store.Revision) ConcreteRevision(org.bimserver.models.store.ConcreteRevision) ConcreteRevision(org.bimserver.models.store.ConcreteRevision) MergeException(org.bimserver.plugins.modelmerger.MergeException) IdEObject(org.bimserver.emf.IdEObject) EObject(org.eclipse.emf.ecore.EObject) IfcModelSet(org.bimserver.plugins.IfcModelSet) UserException(org.bimserver.shared.exceptions.UserException)

Example 17 with OldQuery

use of org.bimserver.database.OldQuery in project BIMserver by opensourceBIM.

the class GetDataObjectsDatabaseAction method execute.

@Override
public List<DataObject> execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
    Revision virtualRevision = getRevisionByRoid(roid);
    IfcModelSet ifcModelSet = new IfcModelSet();
    PackageMetaData lastPackageMetaData = null;
    Map<Integer, Long> pidRoidMap = new HashMap<>();
    pidRoidMap.put(virtualRevision.getProject().getId(), virtualRevision.getOid());
    for (ConcreteRevision concreteRevision : virtualRevision.getConcreteRevisions()) {
        int highestStopId = findHighestStopRid(concreteRevision.getProject(), concreteRevision);
        PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(concreteRevision.getProject().getSchema());
        lastPackageMetaData = packageMetaData;
        IfcModel subModel = getDatabaseSession().createServerModel(packageMetaData, pidRoidMap);
        OldQuery query = new OldQuery(packageMetaData, concreteRevision.getProject().getId(), concreteRevision.getId(), virtualRevision.getOid(), Deep.YES, highestStopId);
        getDatabaseSession().getMap(subModel, query);
        subModel.getModelMetaData().setDate(concreteRevision.getDate());
        ifcModelSet.add(subModel);
    }
    IfcModelInterface ifcModel = getDatabaseSession().createServerModel(lastPackageMetaData, pidRoidMap);
    try {
        ifcModel = getBimServer().getMergerFactory().createMerger(getDatabaseSession(), getAuthorization().getUoid()).merge(virtualRevision.getProject(), ifcModelSet, new ModelHelper(getBimServer().getMetaDataManager(), ifcModel));
    } catch (MergeException e) {
        throw new UserException(e);
    }
    List<DataObject> dataObjects = new ArrayList<DataObject>();
    for (Long oid : ifcModel.keySet()) {
        EObject eObject = ifcModel.get(oid);
        if (eObject.eClass().getEAnnotation("hidden") == null) {
            DataObject dataObject = null;
            if (eObject instanceof IfcRoot) {
                IfcRoot ifcRoot = (IfcRoot) eObject;
                String guid = ifcRoot.getGlobalId() != null ? ifcRoot.getGlobalId() : "";
                String name = ifcRoot.getName() != null ? ifcRoot.getName() : "";
                dataObject = StoreFactory.eINSTANCE.createDataObject();
                dataObject.setType(eObject.eClass().getName());
                ((IdEObjectImpl) dataObject).setOid(oid);
                dataObject.setGuid(guid);
                dataObject.setName(name);
            } else {
                dataObject = StoreFactory.eINSTANCE.createDataObject();
                dataObject.setType(eObject.eClass().getName());
                ((IdEObjectImpl) dataObject).setOid(oid);
                dataObject.setGuid("");
                dataObject.setName("");
            }
            GetDataObjectByOidDatabaseAction.fillDataObject(ifcModel.getObjects(), eObject, dataObject);
            dataObjects.add(dataObject);
        }
    }
    return dataObjects;
}
Also used : IdEObjectImpl(org.bimserver.emf.IdEObjectImpl) ModelHelper(org.bimserver.plugins.ModelHelper) HashMap(java.util.HashMap) PackageMetaData(org.bimserver.emf.PackageMetaData) IfcModelInterface(org.bimserver.emf.IfcModelInterface) IfcRoot(org.bimserver.models.ifc2x3tc1.IfcRoot) ArrayList(java.util.ArrayList) OldQuery(org.bimserver.database.OldQuery) IfcModel(org.bimserver.ifc.IfcModel) DataObject(org.bimserver.models.store.DataObject) Revision(org.bimserver.models.store.Revision) ConcreteRevision(org.bimserver.models.store.ConcreteRevision) ConcreteRevision(org.bimserver.models.store.ConcreteRevision) MergeException(org.bimserver.plugins.modelmerger.MergeException) EObject(org.eclipse.emf.ecore.EObject) IfcModelSet(org.bimserver.plugins.IfcModelSet) UserException(org.bimserver.shared.exceptions.UserException)

Example 18 with OldQuery

use of org.bimserver.database.OldQuery in project BIMserver by opensourceBIM.

the class GetVolumeDatabaseAction method execute.

@Override
public Double execute() throws UserException, BimserverDatabaseException, BimserverLockConflictException {
    Revision revision = getDatabaseSession().get(roid, OldQuery.getDefault());
    IfcProduct ifcProduct = getDatabaseSession().get(oid, new OldQuery(bimServer.getMetaDataManager().getPackageMetaData(revision.getProject().getSchema()), revision.getProject().getId(), revision.getId(), revision.getOid()));
    return ifcProduct.getGeometry().getVolume();
}
Also used : Revision(org.bimserver.models.store.Revision) IfcProduct(org.bimserver.models.ifc2x3tc1.IfcProduct) OldQuery(org.bimserver.database.OldQuery)

Example 19 with OldQuery

use of org.bimserver.database.OldQuery in project BIMserver by opensourceBIM.

the class BimBotRunner method runBimBot.

public BimBotsOutput runBimBot() throws UserException, IOException {
    BimBotContext bimBotContext = new BimBotContext() {

        @Override
        public void updateProgress(String label, int percentage) {
            if (streamingSocketInterface != null) {
                ObjectNode message = objectMapper.createObjectNode();
                message.put("type", "progress");
                message.put("topicId", topicId);
                ObjectNode payload = objectMapper.createObjectNode();
                payload.put("progress", percentage);
                payload.put("label", label);
                message.set("payload", payload);
                streamingSocketInterface.send(message);
            }
        }

        public String getCurrentUser() {
            return authorization.getUsername();
        }

        public String getContextId() {
            return contextId;
        }
    };
    try (DatabaseSession session = bimServer.getDatabase().createSession(OperationType.READ_ONLY)) {
        ServiceMap serviceMap = bimServer.getServiceFactory().get(authorization, AccessMethod.INTERNAL);
        ServiceInterface serviceInterface = serviceMap.get(ServiceInterface.class);
        if (bimServer.getServerSettingsCache().getServerSettings().isStoreServiceRuns()) {
            long start = System.nanoTime();
            // When we store service runs, we can just use the streaming deserializer to stream directly to the database, after that we'll trigger the actual service
            // Create or find project and link user and service to project
            // Checkin stream into project
            // Trigger service
            byte[] data = null;
            if (bimBotsServiceInterface.needsRawInput()) {
                // We need the raw input later on, lets just get it now
                data = ByteStreams.toByteArray(inputStream);
                // Make a clean inputstream that uses the data as the original won't be available after this
                inputStream = new ByteArrayInputStream(data);
            }
            SchemaName schema = SchemaName.valueOf(inputType);
            String projectSchema = getProjectSchema(serviceInterface, schema);
            SProject project = null;
            String uuid = contextId;
            if (uuid != null) {
                project = serviceInterface.getProjectByUuid(uuid);
            } else {
                project = serviceInterface.addProject("tmp-" + new Random().nextInt(), projectSchema);
            }
            SDeserializerPluginConfiguration deserializer = serviceInterface.getSuggestedDeserializerForExtension("ifc", project.getOid());
            if (deserializer == null) {
                throw new BimBotsException("No deserializer found", BimBotDefaultErrorCode.NO_DESERIALIZER);
            }
            Long topicId = serviceInterface.initiateCheckin(project.getOid(), deserializer.getOid());
            ProgressTopic progressTopic = null;
            VirtualEndPoint virtualEndpoint = null;
            try {
                progressTopic = bimServer.getNotificationsManager().getProgressTopic(topicId);
                virtualEndpoint = new VirtualEndPoint() {

                    @Override
                    public NotificationInterface getNotificationInterface() {
                        return new NotificationInterfaceAdaptor() {

                            @Override
                            public void progress(Long topicId, SLongActionState state) throws UserException, ServerException {
                                bimBotContext.updateProgress(state.getTitle(), state.getProgress());
                            }
                        };
                    }
                };
                progressTopic.register(virtualEndpoint);
            } catch (TopicRegisterException e1) {
                e1.printStackTrace();
            }
            serviceInterface.checkinInitiatedSync(topicId, project.getOid(), "Auto checkin", deserializer.getOid(), -1L, "s", new DataHandler(new InputStreamDataSource(inputStream)), false);
            project = serviceInterface.getProjectByPoid(project.getOid());
            PackageMetaData packageMetaData = bimServer.getMetaDataManager().getPackageMetaData(project.getSchema());
            BasicIfcModel model = new BasicIfcModel(packageMetaData, null);
            model.setPluginClassLoaderProvider(bimServer.getPluginManager());
            try {
                Revision revision = session.get(project.getLastRevisionId(), OldQuery.getDefault());
                session.getMap(model, new OldQuery(packageMetaData, project.getId(), revision.getId(), revision.getOid(), Deep.NO));
                model.getModelMetaData().setIfcHeader(revision.getLastConcreteRevision().getIfcHeader());
            } catch (BimserverDatabaseException e) {
                e.printStackTrace();
            }
            BimServerBimBotsInput input = new BimServerBimBotsInput(bimServer, authorization.getUoid(), inputType, data, model, false);
            BimBotsOutput output = bimBotsServiceInterface.runBimBot(input, bimBotContext, settings);
            long end = System.nanoTime();
            if (output.getModel() != null) {
                SerializerPlugin plugin = bimServer.getPluginManager().getSerializerPlugin("org.bimserver.ifc.step.serializer.Ifc2x3tc1StepSerializerPlugin");
                Serializer serializer = plugin.createSerializer(new PluginConfiguration());
                serializer.init(output.getModel(), new ProjectInfo(), true);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                serializer.writeToOutputStream(baos, null);
                output.setData(baos.toByteArray());
                output.setContentType("application/ifc");
            }
            SExtendedData extendedData = new SExtendedData();
            SFile file = new SFile();
            file.setData(output.getData());
            file.setFilename(output.getContentDisposition());
            file.setMime(output.getContentType());
            file.setSize(output.getData().length);
            Long fileId = serviceInterface.uploadFile(file);
            long ms = (end - start) / 1000000;
            extendedData.setTimeToGenerate(ms);
            extendedData.setFileId(fileId);
            extendedData.setTitle(output.getTitle());
            SExtendedDataSchema extendedDataSchema = null;
            try {
                extendedDataSchema = serviceInterface.getExtendedDataSchemaByName(output.getSchemaName());
            } catch (UserException e) {
                extendedDataSchema = new SExtendedDataSchema();
                extendedDataSchema.setContentType(output.getContentType());
                extendedDataSchema.setName(output.getSchemaName());
                serviceInterface.addExtendedDataSchema(extendedDataSchema);
            }
            extendedData.setSchemaId(extendedDataSchema.getOid());
            serviceInterface.addExtendedDataToRevision(project.getLastRevisionId(), extendedData);
            output.setContextId(project.getUuid().toString());
            if (progressTopic != null) {
                try {
                    progressTopic.unregister(virtualEndpoint);
                } catch (TopicRegisterException e) {
                    e.printStackTrace();
                }
            }
            return output;
        } else {
            // When we don't store the service runs, there is no other way than to just use the old deserializer and run the service from the EMF model
            LOGGER.info("NOT Storing intermediate results");
            String projectSchema = getProjectSchema(serviceInterface, SchemaName.valueOf(inputType));
            Schema schema = Schema.valueOf(projectSchema.toUpperCase());
            DeserializerPlugin deserializerPlugin = bimServer.getPluginManager().getFirstDeserializer("ifc", schema, true);
            if (deserializerPlugin == null) {
                throw new BimBotsException("No deserializer plugin found", BimBotDefaultErrorCode.NO_DESERIALIZER);
            }
            byte[] data = IOUtils.toByteArray(inputStream);
            Deserializer deserializer = deserializerPlugin.createDeserializer(new PluginConfiguration());
            PackageMetaData packageMetaData = bimServer.getMetaDataManager().getPackageMetaData(schema.name());
            deserializer.init(packageMetaData);
            IfcModelInterface model = deserializer.read(new ByteArrayInputStream(data), inputType, data.length, null);
            BimServerBimBotsInput input = new BimServerBimBotsInput(bimServer, authorization.getUoid(), inputType, data, model, true);
            BimBotsOutput output = bimBotsServiceInterface.runBimBot(input, bimBotContext, new PluginConfiguration(foundService.getSettings()));
            return output;
        }
    } catch (BimBotsException e) {
        ObjectNode errorNode = OBJECT_MAPPER.createObjectNode();
        errorNode.put("code", e.getErrorCode());
        errorNode.put("message", e.getMessage());
        BimBotsOutput bimBotsOutput = new BimBotsOutput("ERROR", errorNode.toString().getBytes(Charsets.UTF_8));
        return bimBotsOutput;
    } catch (Throwable e) {
        LOGGER.error("", e);
        ObjectNode errorNode = OBJECT_MAPPER.createObjectNode();
        errorNode.put("code", 500);
        // TODO should not leak this much info to called, but for now this is useful debugging info
        errorNode.put("message", "Unknown error: " + e.getMessage());
        BimBotsOutput bimBotsOutput = new BimBotsOutput("ERROR", errorNode.toString().getBytes(Charsets.UTF_8));
        return bimBotsOutput;
    }
}
Also used : SDeserializerPluginConfiguration(org.bimserver.interfaces.objects.SDeserializerPluginConfiguration) ServiceMap(org.bimserver.webservices.ServiceMap) DatabaseSession(org.bimserver.database.DatabaseSession) IfcModelInterface(org.bimserver.emf.IfcModelInterface) SExtendedDataSchema(org.bimserver.interfaces.objects.SExtendedDataSchema) Schema(org.bimserver.emf.Schema) SLongActionState(org.bimserver.interfaces.objects.SLongActionState) DataHandler(javax.activation.DataHandler) SProject(org.bimserver.interfaces.objects.SProject) SExtendedDataSchema(org.bimserver.interfaces.objects.SExtendedDataSchema) InputStreamDataSource(org.bimserver.utils.InputStreamDataSource) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) TopicRegisterException(org.bimserver.notifications.TopicRegisterException) Random(java.util.Random) BimBotsServiceInterface(org.bimserver.bimbots.BimBotsServiceInterface) ServiceInterface(org.bimserver.shared.interfaces.ServiceInterface) ProjectInfo(org.bimserver.plugins.serializers.ProjectInfo) InternalServicePluginConfiguration(org.bimserver.models.store.InternalServicePluginConfiguration) SDeserializerPluginConfiguration(org.bimserver.interfaces.objects.SDeserializerPluginConfiguration) PluginConfiguration(org.bimserver.plugins.PluginConfiguration) UserException(org.bimserver.shared.exceptions.UserException) VirtualEndPoint(org.bimserver.endpoints.VirtualEndPoint) SFile(org.bimserver.interfaces.objects.SFile) Serializer(org.bimserver.plugins.serializers.Serializer) ServerException(org.bimserver.shared.exceptions.ServerException) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) PackageMetaData(org.bimserver.emf.PackageMetaData) DeserializerPlugin(org.bimserver.plugins.deserializers.DeserializerPlugin) BimBotsException(org.bimserver.bimbots.BimBotsException) SerializerPlugin(org.bimserver.plugins.serializers.SerializerPlugin) ByteArrayOutputStream(org.apache.commons.io.output.ByteArrayOutputStream) BasicIfcModel(org.bimserver.ifc.BasicIfcModel) BimServerBimBotsInput(org.bimserver.bimbots.BimServerBimBotsInput) OldQuery(org.bimserver.database.OldQuery) ProgressTopic(org.bimserver.notifications.ProgressTopic) Revision(org.bimserver.models.store.Revision) SExtendedData(org.bimserver.interfaces.objects.SExtendedData) ByteArrayInputStream(java.io.ByteArrayInputStream) BimBotContext(org.bimserver.bimbots.BimBotContext) Deserializer(org.bimserver.plugins.deserializers.Deserializer) BimBotsOutput(org.bimserver.bimbots.BimBotsOutput) NotificationInterface(org.bimserver.shared.interfaces.NotificationInterface) NotificationInterfaceAdaptor(org.bimserver.shared.interfaces.NotificationInterfaceAdaptor) SchemaName(org.bimserver.plugins.SchemaName)

Example 20 with OldQuery

use of org.bimserver.database.OldQuery in project BIMserver by opensourceBIM.

the class NewRevisionNotification method triggerNewRevision.

public void triggerNewRevision(DatabaseSession session, NotificationsManager notificationsManager, final BimServer bimServer, String siteAddress, Project project, final long roid, Trigger trigger, final Service service) throws UserException, ServerException {
    if (service.getTrigger() == trigger) {
        Channel channel = null;
        try {
            IfcModelInterface model = null;
            for (ModelCheckerInstance modelCheckerInstance : service.getModelCheckers()) {
                if (modelCheckerInstance.isValid()) {
                    ModelCheckerPlugin modelCheckerPlugin = bimServer.getPluginManager().getModelCheckerPlugin(modelCheckerInstance.getModelCheckerPluginClassName(), true);
                    if (modelCheckerPlugin != null) {
                        ModelChecker modelChecker = modelCheckerPlugin.createModelChecker(null);
                        ModelCheckerResult result;
                        try {
                            if (model == null) {
                                PackageMetaData packageMetaData = bimServer.getMetaDataManager().getPackageMetaData(project.getSchema());
                                model = new BasicIfcModel(packageMetaData, null);
                                Revision revision;
                                try {
                                    revision = session.get(roid, OldQuery.getDefault());
                                    session.getMap(model, new OldQuery(packageMetaData, project.getId(), revision.getId(), revision.getOid(), Deep.NO));
                                } catch (BimserverDatabaseException e) {
                                    LOGGER.error("", e);
                                }
                            }
                            result = modelChecker.check(model, modelCheckerInstance.getCompiled());
                            if (!result.isValid()) {
                                LOGGER.info("Not triggering");
                                return;
                            }
                        } catch (ModelCheckException e) {
                            LOGGER.info("Not triggering");
                            return;
                        }
                    }
                }
            }
            channel = notificationsManager.getChannel(service);
            final RemoteServiceInterface remoteServiceInterface = channel.get(RemoteServiceInterface.class);
            long writeProjectPoid = service.getWriteRevision() == null ? -1 : service.getWriteRevision().getOid();
            long writeExtendedDataRoid = roid;
            if (writeExtendedDataRoid == -1) {
                LOGGER.error("Write extended data roid is already -1 here");
            }
            @SuppressWarnings("unused") long readRevisionRoid = service.isReadRevision() ? roid : -1;
            long readExtendedDataRoid = service.getReadExtendedData() != null ? roid : -1;
            List<Long> roidsList = new ArrayList<>();
            Set<Project> relatedProjects = getRelatedProjects(project);
            for (Project p : relatedProjects) {
                for (Revision revision : p.getRevisions()) {
                    roidsList.add(revision.getOid());
                }
            }
            long[] roids = new long[roidsList.size()];
            for (int i = 0; i < roids.length; i++) {
                roids[i] = roidsList.get(i);
            }
            final ExplicitRightsAuthorization authorization = new ExplicitRightsAuthorization(bimServer, service.getUser().getOid(), service.getOid(), service.isReadRevision() ? roids : new long[0], writeProjectPoid, readExtendedDataRoid, writeExtendedDataRoid);
            ServiceInterface newService = bimServer.getServiceFactory().get(authorization, AccessMethod.INTERNAL).get(ServiceInterface.class);
            // TODO redundant?
            ((org.bimserver.webservices.impl.ServiceImpl) newService).setAuthorization(authorization);
            AsyncRemoteServiceInterface asyncRemoteServiceInterface = new AsyncRemoteServiceInterface(remoteServiceInterface, bimServer.getExecutorService());
            asyncRemoteServiceInterface.newRevision(poid, roid, service.getOid(), service.getServiceIdentifier(), service.getProfileIdentifier(), service.getToken(), authorization.asHexToken(bimServer.getEncryptionKey()), bimServer.getServerSettingsCache().getServerSettings().getSiteAddress(), new NewRevisionCallback() {

                @Override
                public void success() {
                }

                @Override
                public void error(Throwable e) {
                    LOGGER.error("", e);
                }
            });
        } catch (ChannelConnectionException e) {
            LOGGER.error("", e);
        } catch (PublicInterfaceNotFoundException e) {
            LOGGER.error("", e);
        } finally {
            if (channel != null) {
                // TODO This is interesting, when sending async, is this not going to break?
                channel.disconnect();
            }
        }
    }
}
Also used : RemoteServiceInterface(org.bimserver.shared.interfaces.RemoteServiceInterface) AsyncRemoteServiceInterface(org.bimserver.shared.interfaces.async.AsyncRemoteServiceInterface) NewRevisionCallback(org.bimserver.shared.interfaces.async.AsyncRemoteServiceInterface.NewRevisionCallback) IfcModelInterface(org.bimserver.emf.IfcModelInterface) ArrayList(java.util.ArrayList) AsyncRemoteServiceInterface(org.bimserver.shared.interfaces.async.AsyncRemoteServiceInterface) ModelCheckerResult(org.bimserver.models.store.ModelCheckerResult) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) ModelChecker(org.bimserver.plugins.modelchecker.ModelChecker) ExplicitRightsAuthorization(org.bimserver.webservices.authorization.ExplicitRightsAuthorization) RemoteServiceInterface(org.bimserver.shared.interfaces.RemoteServiceInterface) ServiceInterface(org.bimserver.shared.interfaces.ServiceInterface) AsyncRemoteServiceInterface(org.bimserver.shared.interfaces.async.AsyncRemoteServiceInterface) ModelCheckerInstance(org.bimserver.models.store.ModelCheckerInstance) ModelCheckerPlugin(org.bimserver.plugins.modelchecker.ModelCheckerPlugin) ChannelConnectionException(org.bimserver.shared.ChannelConnectionException) PackageMetaData(org.bimserver.emf.PackageMetaData) Channel(org.bimserver.client.Channel) ModelCheckException(org.bimserver.plugins.modelchecker.ModelCheckException) BasicIfcModel(org.bimserver.ifc.BasicIfcModel) OldQuery(org.bimserver.database.OldQuery) Project(org.bimserver.models.store.Project) Revision(org.bimserver.models.store.Revision) PublicInterfaceNotFoundException(org.bimserver.shared.exceptions.PublicInterfaceNotFoundException)

Aggregations

OldQuery (org.bimserver.database.OldQuery)21 UserException (org.bimserver.shared.exceptions.UserException)17 PackageMetaData (org.bimserver.emf.PackageMetaData)14 Revision (org.bimserver.models.store.Revision)14 IfcModelInterface (org.bimserver.emf.IfcModelInterface)12 IdEObject (org.bimserver.emf.IdEObject)10 ConcreteRevision (org.bimserver.models.store.ConcreteRevision)10 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)9 Project (org.bimserver.models.store.Project)9 IfcModelSet (org.bimserver.plugins.IfcModelSet)9 ModelHelper (org.bimserver.plugins.ModelHelper)9 MergeException (org.bimserver.plugins.modelmerger.MergeException)9 DatabaseSession (org.bimserver.database.DatabaseSession)8 ServerException (org.bimserver.shared.exceptions.ServerException)8 IfcModel (org.bimserver.ifc.IfcModel)7 ArrayList (java.util.ArrayList)6 HashMap (java.util.HashMap)6 BasicIfcModel (org.bimserver.ifc.BasicIfcModel)6 User (org.bimserver.models.store.User)6 EClass (org.eclipse.emf.ecore.EClass)6