Search in sources :

Example 1 with SystemInfo

use of org.mifos.application.admin.system.SystemInfo in project head by mifos.

the class SystemInformationServiceFacadeWebTier method getServerInformation.

@Override
public String getServerInformation(ServletContext context, Locale locale) {
    try {
        DatabaseMetaData metaData = StaticHibernateUtil.getSessionTL().connection().getMetaData();
        final SystemInfo systemInfo = new SystemInfo(metaData, context, locale, true);
        return systemInfo.getApplicationServerInfo();
    } catch (HibernateException e) {
        throw new MifosRuntimeException(e);
    } catch (SQLException e) {
        throw new MifosRuntimeException(e);
    }
}
Also used : SystemInfo(org.mifos.application.admin.system.SystemInfo) HibernateException(org.hibernate.HibernateException) SQLException(java.sql.SQLException) DatabaseMetaData(java.sql.DatabaseMetaData) MifosRuntimeException(org.mifos.core.MifosRuntimeException)

Example 2 with SystemInfo

use of org.mifos.application.admin.system.SystemInfo in project head by mifos.

the class SystemInformationServiceFacadeWebTier method getSystemInformation.

@Override
public SystemInformationDto getSystemInformation(ServletContext context, Locale locale) {
    try {
        DatabaseMetaData metaData = StaticHibernateUtil.getSessionTL().connection().getMetaData();
        final SystemInfo systemInfo = new SystemInfo(metaData, context, locale, true);
        systemInfo.setCustomReportsDir(BirtReportsUploadAction.getCustomReportStorageDirectory());
        return new SystemInformationDto(systemInfo.getApplicationServerInfo(), systemInfo.getApplicationVersion(), systemInfo.getBuildDate(), systemInfo.getBuildNumber(), systemInfo.getCommitIdentifier(), systemInfo.getCustomReportsDir(), systemInfo.getDatabaseName(), systemInfo.getDatabasePort(), systemInfo.getDatabaseServer(), systemInfo.getDatabaseUser(), systemInfo.getDatabaseVendor(), systemInfo.getDatabaseVersion(), systemInfo.getDriverName(), systemInfo.getDriverVersion(), systemInfo.getDateTimeString(), systemInfo.getDateTimeStringIso8601(), systemInfo.getInfoSource(), systemInfo.getInfoURL(), systemInfo.getJavaVendor(), systemInfo.getJavaVersion(), systemInfo.getOsArch(), systemInfo.getOsName(), systemInfo.getOsUser(), systemInfo.getOsVersion(), systemInfo.getReleaseName());
    } catch (HibernateException e) {
        throw new MifosRuntimeException(e);
    } catch (SQLException e) {
        throw new MifosRuntimeException(e);
    }
}
Also used : SystemInfo(org.mifos.application.admin.system.SystemInfo) HibernateException(org.hibernate.HibernateException) SQLException(java.sql.SQLException) DatabaseMetaData(java.sql.DatabaseMetaData) MifosRuntimeException(org.mifos.core.MifosRuntimeException)

Aggregations

DatabaseMetaData (java.sql.DatabaseMetaData)2 SQLException (java.sql.SQLException)2 HibernateException (org.hibernate.HibernateException)2 SystemInfo (org.mifos.application.admin.system.SystemInfo)2 MifosRuntimeException (org.mifos.core.MifosRuntimeException)2