use of password.pwm.util.java.PwmNumberFormat in project pwm by pwm-project.
the class AppDashboardData method makeLocalDbTableSizes.
private static Map<LocalDB.DB, String> makeLocalDbTableSizes(final PwmApplication pwmApplication, final Locale locale) {
final Map<LocalDB.DB, String> returnData = new LinkedHashMap<>();
final LocalDB localDB = pwmApplication.getLocalDB();
final PwmNumberFormat numberFormat = PwmNumberFormat.forLocale(locale);
try {
for (final LocalDB.DB db : LocalDB.DB.values()) {
returnData.put(db, numberFormat.format(localDB.size(db)));
}
} catch (LocalDBException e) {
LOGGER.error("error making localDB size bean: " + e.getMessage());
}
return Collections.unmodifiableMap(returnData);
}
Aggregations