org.keycloak.services.resources.admin

## Class RealmLocalizationResource

- java.lang.Object
- - org.keycloak.services.resources.admin.RealmLocalizationResource

-     public class RealmLocalizationResource
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RealmLocalizationResource(RealmModel realm, AdminPermissionEvaluator auth)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deleteRealmLocalizationText(String locale, String key)`
    `void` | `deleteRealmLocalizationTexts(String locale)`
    `List<String>` | `getRealmLocalizationLocales()`
    `String` | `getRealmLocalizationText(String locale, String key)`
    `Map<String,String>` | `getRealmLocalizationTexts(String locale)`
    `void` | `patchRealmLocalizationTexts(String locale, Map<String,String> loclizationTexts)`
    `void` | `patchRealmLocalizationTextsFromFile(String locale, org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)` Import localization from uploaded JSON file
    `void` | `saveRealmLocalizationText(String locale, String key, String text)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### RealmLocalizationResource

          public RealmLocalizationResource(RealmModel realm,
                                           AdminPermissionEvaluator auth)

  - ### Method Detail

    - #### saveRealmLocalizationText

          @Path(value="{locale}/{key}")
           @PUT
           @Consumes(value="text/plain")
          public void saveRealmLocalizationText(@PathParam(value="locale")
                                                                                                                   String locale,
                                                                                                                   @PathParam(value="key")
                                                                                                                   String key,
                                                                                                                   String text)

    - #### patchRealmLocalizationTextsFromFile

          @POST
           @Path(value="{locale}")
           @Consumes(value="multipart/form-data")
          public void patchRealmLocalizationTextsFromFile(@PathParam(value="locale")
                                                                                                                                 String locale,
                                                                                                                                 org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
                                                                                                                          throws IOException

      Import localization from uploaded JSON file
      Throws:
        `IOException`

    - #### patchRealmLocalizationTexts

          @PATCH
           @Path(value="{locale}")
           @Consumes(value="application/json")
          public void patchRealmLocalizationTexts(@PathParam(value="locale")
                                                                                                                       String locale,
                                                                                                                       Map<String,String> loclizationTexts)

    - #### deleteRealmLocalizationTexts

          @Path(value="{locale}")
           @DELETE
          public void deleteRealmLocalizationTexts(@PathParam(value="locale")
                                                                                    String locale)

    - #### deleteRealmLocalizationText

          @Path(value="{locale}/{key}")
           @DELETE
          public void deleteRealmLocalizationText(@PathParam(value="locale")
                                                                                         String locale,
                                                                                         @PathParam(value="key")
                                                                                         String key)

    - #### getRealmLocalizationLocales

          @GET
           @Produces(value="application/json")
          public List<String> getRealmLocalizationLocales()

    - #### getRealmLocalizationTexts

          @Path(value="{locale}")
           @GET
           @Produces(value="application/json")
          public Map<String,String> getRealmLocalizationTexts(@PathParam(value="locale")
                                                                                                                                 String locale)

    - #### getRealmLocalizationText

          @Path(value="{locale}/{key}")
           @GET
           @Produces(value="text/plain")
          public String getRealmLocalizationText(@PathParam(value="locale")
                                                                                                                    String locale,
                                                                                                                    @PathParam(value="key")
                                                                                                                    String key)

Copyright © 2020 JBoss by Red Hat. All rights reserved.