Search in sources :

Example 1 with DefaultLocaleView

use of net.geoprism.registry.localization.DefaultLocaleView in project geoprism-registry by terraframe.

the class RegistryService method getLocales.

@Request(RequestType.SESSION)
public JsonArray getLocales(String sessionId) {
    Set<SupportedLocaleIF> locales = LocalizationFacade.getSupportedLocales();
    JsonArray array = new JsonArray();
    array.add(new DefaultLocaleView().toJson());
    for (SupportedLocaleIF locale : locales) {
        array.add(LocaleView.fromSupportedLocale(locale).toJson());
    }
    return array;
}
Also used : JsonArray(com.google.gson.JsonArray) DefaultLocaleView(net.geoprism.registry.localization.DefaultLocaleView) SupportedLocaleIF(com.runwaysdk.localization.SupportedLocaleIF) Request(com.runwaysdk.session.Request) OAuthClientRequest(org.apache.oltu.oauth2.client.request.OAuthClientRequest)

Aggregations

JsonArray (com.google.gson.JsonArray)1 SupportedLocaleIF (com.runwaysdk.localization.SupportedLocaleIF)1 Request (com.runwaysdk.session.Request)1 DefaultLocaleView (net.geoprism.registry.localization.DefaultLocaleView)1 OAuthClientRequest (org.apache.oltu.oauth2.client.request.OAuthClientRequest)1