public class LocalizationServlet extends ServletBase
debug| Constructor and Description |
|---|
LocalizationServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected ResourceBundle |
getBundle(String pluginId,
String name)
Retrieve a
ResourceBundle from a plugin. |
String |
getJSONBundle(String pluginId,
String name)
Load the resource bundle for the plugin provided and return the resulting properties map as JSON.
|
protected String |
getJsonForBundle(ResourceBundle bundle)
Convert a
ResourceBundle into a JSON string. |
org.apache.commons.logging.Log |
getLogger() |
boolean |
isMessageCachingEnabled(org.pentaho.platform.api.engine.IPluginManager pm,
String pluginId)
Should the messages in the Resource Bundle be cached?
|
debug, debug, error, error, fatal, fatal, getLoggingLevel, getObjectName, getPentahoSession, info, info, setCorsHeaders, setLoggingLevel, trace, trace, warn, warndoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic org.apache.commons.logging.Log getLogger()
getLogger in class ServletBasepublic void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected ResourceBundle getBundle(String pluginId, String name)
ResourceBundle from a plugin.pluginId - ID of the plugin to load the resource bundle fromname - Resource bundle name that resides in the pluginpluginIdIllegalArgumentException - Invalid plugin IdMissingResourceException - Invalid resource bundle namepublic boolean isMessageCachingEnabled(org.pentaho.platform.api.engine.IPluginManager pm,
String pluginId)
pm - Plugin managerpluginId - ID of plugin whose "cache-messages" setting should be checkedtrue if the localization messages loaded from this plugin should be cachedpublic String getJSONBundle(String pluginId, String name)
pluginId - ID of plugin to load the resource fromname - Name of the resource to loadprotected String getJsonForBundle(ResourceBundle bundle) throws org.json.JSONException
ResourceBundle into a JSON string.bundle - Resource bundle to convertorg.json.JSONExceptionCopyright © 2021 Hitachi Vantara. All rights reserved.