|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.stapler.Facet
org.kohsuke.stapler.jelly.JellyFacet
@MetaInfServices(value=Facet.class) public class JellyFacet
Facet
that adds Jelly as the view.
Field Summary | |
---|---|
ResourceBundleFactory |
resourceBundleFactory
Used to load ResourceBundle s. |
ScriptInvoker |
scriptInvoker
Used to invoke Jelly script. |
static boolean |
TRACE
This flag will activate the Jelly evaluation trace. |
Fields inherited from class org.kohsuke.stapler.Facet |
---|
LOGGER |
Constructor Summary | |
---|---|
JellyFacet()
|
Method Summary | |
---|---|
void |
buildViewDispatchers(MetaClass owner,
java.util.List<Dispatcher> dispatchers)
Adds Dispatcher s that look at one token and binds that
to the views associated with the 'it' object. |
javax.servlet.RequestDispatcher |
createRequestDispatcher(RequestImpl request,
java.lang.Class type,
java.lang.Object it,
java.lang.String viewName)
Creates a RequestDispatcher that handles the given view, or
return null if no such view was found. |
java.util.Collection<java.lang.Class<JellyClassTearOff>> |
getClassTearOffTypes()
|
java.util.Collection<java.lang.String> |
getScriptExtensions()
Gets the list of view script extensions, such as ".jelly". |
boolean |
handleIndexRequest(RequestImpl req,
ResponseImpl rsp,
java.lang.Object node,
MetaClass nodeMetaClass)
Attempts to route the HTTP request to the 'index' page of the 'it' object. |
static void |
setExpressionFactory(javax.servlet.ServletContextEvent event,
org.apache.commons.jelly.expression.ExpressionFactory factory)
Sets the Jelly ExpressionFactory to be used to parse views. |
Methods inherited from class org.kohsuke.stapler.Facet |
---|
buildFallbackDispatchers, discover, discoverExtensions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public volatile ScriptInvoker scriptInvoker
public volatile ResourceBundleFactory resourceBundleFactory
ResourceBundle
s.
public static boolean TRACE
Constructor Detail |
---|
public JellyFacet()
Method Detail |
---|
public void buildViewDispatchers(MetaClass owner, java.util.List<Dispatcher> dispatchers)
Facet
Dispatcher
s that look at one token and binds that
to the views associated with the 'it' object.
buildViewDispatchers
in class Facet
public java.util.Collection<java.lang.Class<JellyClassTearOff>> getClassTearOffTypes()
getClassTearOffTypes
in interface JellyCompatibleFacet
public java.util.Collection<java.lang.String> getScriptExtensions()
JellyCompatibleFacet
getScriptExtensions
in interface JellyCompatibleFacet
public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request, java.lang.Class type, java.lang.Object it, java.lang.String viewName) throws java.io.IOException
Facet
RequestDispatcher
that handles the given view, or
return null if no such view was found.
createRequestDispatcher
in class Facet
type
- If "it" is non-null, it.getClass()
. Otherwise the class
from which the view is searched.
java.io.IOException
public boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, java.lang.Object node, MetaClass nodeMetaClass) throws java.io.IOException, javax.servlet.ServletException
Facet
handleIndexRequest
in class Facet
java.io.IOException
javax.servlet.ServletException
public static void setExpressionFactory(javax.servlet.ServletContextEvent event, org.apache.commons.jelly.expression.ExpressionFactory factory)
ExpressionFactory
to be used to parse views.
This method should be invoked from your implementation of
ServletContextListener.contextInitialized(ServletContextEvent)
.
Once views are parsed, they won't be re-parsed just because you called this method to override the expression factory.
The primary use case of this feature is to customize the behavior of JEXL evaluation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |