use of com.serotonin.db.pair.StringStringPair in project ma-core-public by infiniteautomation.
the class PublisherListDwr method init.
@DwrPermission(admin = true)
public ProcessResult init() {
ProcessResult response = new ProcessResult();
List<StringStringPair> translatedTypes = new ArrayList<StringStringPair>();
for (String type : ModuleRegistry.getPublisherDefinitionTypes()) translatedTypes.add(new StringStringPair(type, translate(ModuleRegistry.getPublisherDefinition(type).getDescriptionKey())));
StringStringPairComparator.sort(translatedTypes);
response.addData("types", translatedTypes);
response.addData("publishers", PublisherDao.instance.getPublishers(new PublisherDao.PublisherNameComparator()));
return response;
}
use of com.serotonin.db.pair.StringStringPair in project ma-core-public by infiniteautomation.
the class Common method getLanguages.
public static List<StringStringPair> getLanguages() {
if (languages == null) {
languages = new ArrayList<StringStringPair>();
for (String localeStr : ModuleRegistry.getLocales()) {
Locale locale = parseLocale(localeStr);
if (locale != null)
languages.add(new StringStringPair(localeStr, Translations.getTranslations(locale).translate("locale.name")));
}
StringStringPairComparator.sort(languages);
}
return languages;
}
Aggregations