Search in sources :

Example 1 with UpdateModelCompareDatabaseAction

use of org.bimserver.database.actions.UpdateModelCompareDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method updateModelCompare.

@Override
public void updateModelCompare(SModelComparePluginConfiguration modelCompare) throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        ModelComparePluginConfiguration convert = session.get(modelCompare.getOid(), OldQuery.getDefault());
        getBimServer().getSConverter().convertFromSObject(modelCompare, convert, session);
        session.executeAndCommitAction(new UpdateModelCompareDatabaseAction(session, getInternalAccessMethod(), convert));
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
}
Also used : UpdateModelCompareDatabaseAction(org.bimserver.database.actions.UpdateModelCompareDatabaseAction) DatabaseSession(org.bimserver.database.DatabaseSession) ModelComparePluginConfiguration(org.bimserver.models.store.ModelComparePluginConfiguration) SModelComparePluginConfiguration(org.bimserver.interfaces.objects.SModelComparePluginConfiguration) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Aggregations

IOException (java.io.IOException)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 UpdateModelCompareDatabaseAction (org.bimserver.database.actions.UpdateModelCompareDatabaseAction)1 SModelComparePluginConfiguration (org.bimserver.interfaces.objects.SModelComparePluginConfiguration)1 ModelComparePluginConfiguration (org.bimserver.models.store.ModelComparePluginConfiguration)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1