use of org.bimserver.database.actions.GetDatabaseInformationAction in project BIMserver by opensourceBIM.
the class AdminServiceImpl method getDatabaseInformation.
@Override
public SDatabaseInformation getDatabaseInformation() throws ServerException, UserException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<DatabaseInformation> action = new GetDatabaseInformationAction(session, getInternalAccessMethod());
return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(action));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations