com.atlassian.confluence.tinymceplugin
Class LanguagePackServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.confluence.tinymceplugin.LanguagePackServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class LanguagePackServlet
extends javax.servlet.http.HttpServlet

Creates a JSON object containing the localised strings used by TinyMCE. The language is specified in the URI. The strings localised are those in dynamic.js.vm.

See Also:
Serialized Form

Constructor Summary
LanguagePackServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 I18NBeanFactory getI18nBeanFactory()
           
protected  void writeTemplateToStream(java.lang.String templateName, java.lang.String language, java.io.OutputStream os)
          Renders a template directly to the given output stream.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguagePackServlet

public LanguagePackServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

writeTemplateToStream

protected void writeTemplateToStream(java.lang.String templateName,
                                     java.lang.String language,
                                     java.io.OutputStream os)

Renders a template directly to the given output stream.

An I18NBean is put into the context and available as 'i18n' in the template.

Parameters:
language - the language of the user
templateName - the name of the template to use. This method will look for it in the classloader.

getI18nBeanFactory

public I18NBeanFactory getI18nBeanFactory()


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.