use of org.bimserver.interfaces.objects.SBimServerInfo in project BIMserver by opensourceBIM.
the class AdminServiceImpl method getBimServerInfo.
@Override
public SBimServerInfo getBimServerInfo() throws ServerException, UserException {
requireAdminOrMonitorAuthentication();
SBimServerInfo bimServerInfo = new SBimServerInfo();
SVersion version = getBimServer().getVersionChecker().getLocalVersion();
SVersion latestVersion = getBimServer().getVersionChecker().getOnlineVersion();
SDatabaseInformation databaseInformation = getDatabaseInformation();
bimServerInfo.setCurrentVersion(version.getFullString());
bimServerInfo.setCurrentDate(version.getDate());
if (latestVersion != null) {
bimServerInfo.setLatestVersion(latestVersion.getMajor() + "." + latestVersion.getMinor() + "." + latestVersion.getRevision());
bimServerInfo.setLatestDate(latestVersion.getDate());
}
bimServerInfo.setCheckouts(databaseInformation.getNumberOfCheckouts());
bimServerInfo.setRevisions(databaseInformation.getNumberOfRevisions());
bimServerInfo.setUsers(databaseInformation.getNumberOfUsers());
bimServerInfo.setProjects(databaseInformation.getNumberOfProjects());
bimServerInfo.setSchemaVersion(databaseInformation.getSchemaVersion());
bimServerInfo.setServerLogUrl(getBimServer().getServerSettingsCache().getServerSettings().getSiteAddress() + "/download?token=" + getServiceMap().getAuthorization().asHexToken(getBimServer().getEncryptionKey()) + "&action=getfile&type=serverlog");
bimServerInfo.setStarted(getServerStartTime());
return bimServerInfo;
}
Aggregations