|
||||||||||
| 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 ResourceBundles. |
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 Dispatchers that look at one token and binds that
to the views associated with the 'it' object. |
javax.servlet.RequestDispatcher |
createRequestDispatcher(RequestImpl request,
Klass<?> 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, createRequestDispatcher, discover, discoverExtensions, getKlass |
| 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
ResourceBundles.
public static boolean TRACE
| Constructor Detail |
|---|
public JellyFacet()
| Method Detail |
|---|
public void buildViewDispatchers(MetaClass owner,
java.util.List<Dispatcher> dispatchers)
FacetDispatchers that look at one token and binds that
to the views associated with the 'it' object.
buildViewDispatchers in class Facetpublic java.util.Collection<java.lang.Class<JellyClassTearOff>> getClassTearOffTypes()
getClassTearOffTypes in interface JellyCompatibleFacetpublic java.util.Collection<java.lang.String> getScriptExtensions()
JellyCompatibleFacet
getScriptExtensions in interface JellyCompatibleFacet
public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request,
Klass<?> type,
java.lang.Object it,
java.lang.String viewName)
throws java.io.IOException
FacetRequestDispatcher that handles the given view, or
return null if no such view was found.
createRequestDispatcher in class Facettype - 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 Facetjava.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 | |||||||||