use of com.runwaysdk.system.metadata.SupportedLocale in project geoprism-registry by terraframe.
the class LocalizationService method installLocaleInTransaction.
@Transaction
private LocaleView installLocaleInTransaction(LocaleView view) {
SupportedLocaleIF supportedLocale = (SupportedLocale) com.runwaysdk.localization.LocalizationFacade.install(view.getLocale());
supportedLocale.appLock();
view.populate(supportedLocale);
supportedLocale.apply();
new WMSService().createAllWMSLayers(true);
// Refresh the users session
((Session) Session.getCurrentSession()).reloadPermissions();
// Refresh the entire metadata cache
ServiceFactory.getRegistryService().refreshMetadataCache();
return LocaleView.fromSupportedLocale(supportedLocale);
}
use of com.runwaysdk.system.metadata.SupportedLocale in project geoprism-registry by terraframe.
the class LocalizationService method editLocaleInTransaction.
@Transaction
private LocaleView editLocaleInTransaction(LocaleView view) {
if (view.isDefaultLocale) {
LocalizedValueStore lvs = LocalizedValueStore.getByKey(DefaultLocaleView.LABEL);
lvs.lock();
lvs.getStoreValue().setLocaleMap(view.getLabel().getLocaleMap());
lvs.apply();
view.getLabel().setValue(lvs.getStoreValue().getValue());
return view;
} else {
SupportedLocaleIF supportedLocale = (SupportedLocale) com.runwaysdk.localization.LocalizationFacade.getSupportedLocale(view.getLocale());
supportedLocale.appLock();
view.populate(supportedLocale);
supportedLocale.apply();
// Refresh the users session
((Session) Session.getCurrentSession()).reloadPermissions();
// Refresh the entire metadata cache
ServiceFactory.getRegistryService().refreshMetadataCache();
return LocaleView.fromSupportedLocale(supportedLocale);
}
}
Aggregations