com.atlassian.jira.servlet
Class VelocityPluginRessourceResolver

java.lang.Object
  extended by com.atlassian.jira.servlet.VelocityPluginRessourceResolver
All Implemented Interfaces:
com.atlassian.cache.servlet.resolver.ContentResolver
Direct Known Subclasses:
CSSVelocityPluginRessourceResolver

public class VelocityPluginRessourceResolver
extends java.lang.Object
implements com.atlassian.cache.servlet.resolver.ContentResolver

Version:
$Id$
Author:
Kaamelot - 2006 Description : Provide a Resolver for Plugin Ressource

Field Summary
protected  org.apache.log4j.Category log
           
protected  com.atlassian.plugin.PluginManager pluginManager
           
 
Constructor Summary
VelocityPluginRessourceResolver()
           
 
Method Summary
 java.lang.String getContent(java.lang.String _path, javax.servlet.http.HttpServletRequest _request, javax.servlet.http.HttpServletResponse _response)
           
protected  java.lang.String getFileContent(java.lang.String _path, javax.servlet.http.HttpServletRequest _request, javax.servlet.http.HttpServletResponse _response)
          The use of RequestDispatcher.dispatch() to resolve the ressources identified by [_path] is possible due to a HTTP Client connection is close.
 java.util.Map getVelocityParameters(java.lang.String _path, javax.servlet.http.HttpServletRequest _request, javax.servlet.http.HttpServletResponse _response)
           
 void init(javax.servlet.ServletConfig servletConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.log4j.Category log

pluginManager

protected com.atlassian.plugin.PluginManager pluginManager
Constructor Detail

VelocityPluginRessourceResolver

public VelocityPluginRessourceResolver()
Method Detail

getContent

public java.lang.String getContent(java.lang.String _path,
                                   javax.servlet.http.HttpServletRequest _request,
                                   javax.servlet.http.HttpServletResponse _response)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
Specified by:
getContent in interface com.atlassian.cache.servlet.resolver.ContentResolver
Throws:
java.io.IOException
javax.servlet.ServletException

getVelocityParameters

public java.util.Map getVelocityParameters(java.lang.String _path,
                                           javax.servlet.http.HttpServletRequest _request,
                                           javax.servlet.http.HttpServletResponse _response)
                                    throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface com.atlassian.cache.servlet.resolver.ContentResolver
Throws:
javax.servlet.ServletException

getFileContent

protected java.lang.String getFileContent(java.lang.String _path,
                                          javax.servlet.http.HttpServletRequest _request,
                                          javax.servlet.http.HttpServletResponse _response)
                                   throws java.io.IOException,
                                          javax.servlet.ServletException
The use of RequestDispatcher.dispatch() to resolve the ressources identified by [_path] is possible due to a HTTP Client connection is close. The Servlet and DownloadStrategy Class are used directly !

Parameters:
_path -
_request -
_response -
Returns:
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2007-2008 Kaamelot Plugins. All Rights Reserved.