public abstract class Facet extends Object
MetaInfServices
on subtypes so that Stapler can discover them.Constructor and Description |
---|
Facet() |
Modifier and Type | Method and Description |
---|---|
void |
buildFallbackDispatchers(MetaClass owner,
List<Dispatcher> dispatchers)
Adds
Dispatcher s that do catch-all behaviours like "doDispatch" does. |
abstract void |
buildViewDispatchers(MetaClass owner,
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,
Class type,
Object it,
String viewName) |
javax.servlet.RequestDispatcher |
createRequestDispatcher(RequestImpl request,
Klass<?> type,
Object it,
String viewName)
Creates a
RequestDispatcher that handles the given view, or
return null if no such view was found. |
static List<Facet> |
discover(ClassLoader cl)
Discovers all the facets in the classloader.
|
static <T> List<T> |
discoverExtensions(Class<T> type,
ClassLoader... cls) |
Klass<?> |
getKlass(Object o)
Maps an instance to a
Klass . |
abstract boolean |
handleIndexRequest(RequestImpl req,
ResponseImpl rsp,
Object node,
MetaClass nodeMetaClass)
Attempts to route the HTTP request to the 'index' page of the 'it' object.
|
public static final Logger LOGGER
public abstract void buildViewDispatchers(MetaClass owner, List<Dispatcher> dispatchers)
Dispatcher
s that look at one token and binds that
to the views associated with the 'it' object.public void buildFallbackDispatchers(MetaClass owner, List<Dispatcher> dispatchers)
Dispatcher
s that do catch-all behaviours like "doDispatch" does.public static List<Facet> discover(ClassLoader cl)
public static <T> List<T> discoverExtensions(Class<T> type, ClassLoader... cls)
public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException
RequestDispatcher
that handles the given view, or
return null if no such view was found.type
- If "it" is non-null, it.getClass()
. Otherwise the class
from which the view is searched.IOException
public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request, Class type, Object it, String viewName) throws IOException
IOException
public abstract boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, Object node, MetaClass nodeMetaClass) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2014. All rights reserved.