The ContentResolvers VelocityPluginRessourceResolver provides a ContentResolver capability,
joining VelocityContentResolver and FileServerServlet.
In other terms, it gives the ability to serve from a Atlassian Plugin JAR a Velocity File as Resource
See below, its usage in Minyaa Core plugin...
01.
<
servlet
name
=
"Combined CSS Servlet for Plugin"
key
=
"AddOnCss"
class
=
"com.atlassian.cache.servlet.CombinedCachingServlet"
>
02.
<
description
>New instance of CombinedCachingServlet to serve CSS Velocity Based from JAR Resource</
description
>
03.
<
url-pattern
>/styles/combined.addon.css</
url-pattern
>
04.
05.
<
init-param
>
06.
<
param-name
>content.type</
param-name
>
07.
<
param-value
>text/css</
param-value
>
08.
</
init-param
>
09.
<
init-param
>
10.
<
param-name
>content.resolver.divContainer</
param-name
>
11.
<
param-value
>com.atlassian.jira.servlet.VelocityPluginRessourceResolver</
param-value
>
12.
</
init-param
>
13.
<
init-param
>
14.
<
param-name
>divContainer</
param-name
>
15.
<
param-value
>/download/resources/jira.plugin.minyaa.core:Actions/skins/aqua/theme.vm</
param-value
>
16.
</
init-param
>
17.
</
servlet
>
1.
<
style
type
=
"text/css"
>
2.
@import url($req.contextPath/plugins/servlet/styles/combined.addon.css);
3.
</
style
>
The Servlet com.atlassian.jira.servlet.DWRServlet is extending uk.ltd.getahead.dwr.DWRServlet
It gives the ability to implement your own DWR configuration based on Plugin Resources.
See below, its usage in Minyaa Core Plugin :
.
01.
<
servlet
name
=
"Overrided DWRServlet for Minyaa Core Plugin"
key
=
"minyaaCoreDWRServlet"
class
=
"com.atlassian.jira.servlet.DWRServlet"
>
02.
<
description
key
=
"servlet.descrition"
/>
03.
<
resource
type
=
"i18n"
name
=
"i18n"
location
=
"com.atlassian.jira.plugins.servlets.minyaaDWRSerlvet"
/>
04.
<
url-pattern
>/minyaaDwr/*</
url-pattern
>
05.
<
init-param
>
06.
<
param-name
>customConfigurator</
param-name
>
07.
<
param-value
>org.directwebremoting.jiraplugin.DwrXmlConfigurator</
param-value
>
08.
</
init-param
>
09.
<
init-param
>
10.
<
param-name
>customConfig</
param-name
>
11.
<
param-value
>/download/resources/jira.plugin.minyaa.core:Actions/dwr</
param-value
>
12.
</
init-param
>
13.
<
init-param
>
14.
<
param-name
>urlPivot</
param-name
>
15.
<
param-value
>/minyaaDwr/</
param-value
>
16.
</
init-param
>
17.
</
servlet
>
1.
<
script
language
=
"JavaScript"
src
=
"$req.contextPath/plugins/servlet/fastWorklogDwr/interface/FastLogWorkAjaxUtil.js"
></
script
>