use of org.bimserver.database.actions.AddQueryEngineDatabaseAction in project BIMserver by opensourceBIM.
the class PluginServiceImpl method addQueryEngine.
@Override
public Long addQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
QueryEnginePluginConfiguration convert = getBimServer().getSConverter().convertFromSObject(queryEngine, session);
return session.executeAndCommitAction(new AddQueryEngineDatabaseAction(session, getInternalAccessMethod(), getAuthorization(), convert));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations