|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.stapler.WebApp
public class WebApp
Object scoped to the entire webapp. Mostly used for configuring behavior of Stapler.
In contrast, Stapler
is a servlet, so there can be multiple instances per webapp.
get(ServletContext)
,
getCurrent()
,
Stapler.getWebApp()
Field Summary | |
---|---|
BoundObjectTable |
boundObjectTable
Handles objects that are exported. |
javax.servlet.ServletContext |
context
ServletContext for this webapp. |
java.util.Map<java.lang.String,java.lang.String> |
defaultEncodingForStaticResources
MIME type -> encoding map that determines how static contents in the war file is served. |
java.util.List<Facet> |
facets
Activated facets. |
java.util.Map<java.lang.String,java.lang.String> |
mimeTypes
MIME type mapping from extensions (like "txt" or "jpg") to MIME types ("foo/bar"). |
java.util.Map<java.lang.Class,java.lang.Class[]> |
wrappers
Duck-type wrappers for the given class. |
Constructor Summary | |
---|---|
WebApp(javax.servlet.ServletContext context)
|
Method Summary | ||
---|---|---|
void |
clearScripts(java.lang.Class<? extends AbstractTearOff> clazz)
Convenience maintenance method to clear all the cached scripts for the given tearoff type. |
|
static WebApp |
get(javax.servlet.ServletContext context)
Obtains the WebApp associated with the given ServletContext . |
|
java.lang.Object |
getApp()
Returns the 'app' object, which is the user-specified object that sits at the root of the URL hierarchy and handles the request to '/'. |
|
java.lang.ClassLoader |
getClassLoader()
|
|
CrumbIssuer |
getCrumbIssuer()
|
|
static WebApp |
getCurrent()
Gets the current WebApp that the calling thread is associated with. |
|
|
getFacet(java.lang.Class<T> type)
If the facet of the given type exists, return it. |
|
Klass<?> |
getKlass(java.lang.Object o)
|
|
MetaClass |
getMetaClass(java.lang.Class c)
|
|
MetaClass |
getMetaClass(Klass<?> c)
|
|
MetaClass |
getMetaClass(java.lang.Object o)
Obtains a MetaClass that represents the type of the given object. |
|
java.util.concurrent.CopyOnWriteArrayList<HttpResponseRenderer> |
getResponseRenderers()
|
|
void |
setApp(java.lang.Object app)
|
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the classloader used by StaplerRequest.bindJSON(Class, JSONObject) and its sibling methods. |
|
void |
setCrumbIssuer(CrumbIssuer crumbIssuer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final javax.servlet.ServletContext context
ServletContext
for this webapp.
public final java.util.Map<java.lang.Class,java.lang.Class[]> wrappers
public final java.util.Map<java.lang.String,java.lang.String> defaultEncodingForStaticResources
public final java.util.List<Facet> facets
public final java.util.Map<java.lang.String,java.lang.String> mimeTypes
public final BoundObjectTable boundObjectTable
Constructor Detail |
---|
public WebApp(javax.servlet.ServletContext context)
Method Detail |
---|
public static WebApp get(javax.servlet.ServletContext context)
WebApp
associated with the given ServletContext
.
public java.lang.Object getApp()
public void setApp(java.lang.Object app)
public CrumbIssuer getCrumbIssuer()
public void setCrumbIssuer(CrumbIssuer crumbIssuer)
public java.util.concurrent.CopyOnWriteArrayList<HttpResponseRenderer> getResponseRenderers()
public java.lang.ClassLoader getClassLoader()
public <T extends Facet> T getFacet(java.lang.Class<T> type)
public void setClassLoader(java.lang.ClassLoader classLoader)
StaplerRequest.bindJSON(Class, JSONObject)
and its sibling methods.
public MetaClass getMetaClass(java.lang.Class c)
public MetaClass getMetaClass(Klass<?> c)
public MetaClass getMetaClass(java.lang.Object o)
MetaClass
that represents the type of the given object.
This code consults all facets to handle scripting language objects correctly.
public Klass<?> getKlass(java.lang.Object o)
public void clearScripts(java.lang.Class<? extends AbstractTearOff> clazz)
This is useful when you want to have the scripts reloaded into the live system without
the performance penalty of MetaClass.NO_CACHE
.
MetaClass.NO_CACHE
public static WebApp getCurrent()
WebApp
that the calling thread is associated with.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |