public abstract class PageDecorator extends Descriptor<PageDecorator> implements ExtensionPoint, Describable<PageDecorator>
This class provides a few hooks to augument the HTML generation process of Hudson, across all the HTML pages that Hudson delivers.
For example, if you'd like to add a Google Analytics stat to Hudson, then you need to inject a small script fragment to all Hudson pages. This extension point provides a means to do that.
Plugin
s that contribute this extension point
should implement a new decorator and put Extension
on the class.
If this extension point needs to expose a global configuration, write this jelly page.
See Descriptor
for more about this. Optional.
This page is added right before the </body> tag. Convenient place for adding tracking beacons, etc.
This page is added right before the </head> tag. Convenient place for additional stylesheet, <meta> tags, etc.
This is a generalization of the X-Jenkins header that aids auto-discovery. This fragment can write additional <st:header name="..." value="..." /> tags that go along with it.
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static List<PageDecorator> |
ALL
|
clazz
Modifier | Constructor and Description |
---|---|
protected |
PageDecorator() |
protected |
PageDecorator(Class<? extends PageDecorator> yourClass)
Deprecated.
as of 1.425
Use the default constructor that's less error prone
|
Modifier and Type | Method and Description |
---|---|
static ExtensionList<PageDecorator> |
all()
Returns all the registered
PageDecorator descriptors. |
Descriptor<PageDecorator> |
getDescriptor()
Gets the descriptor for this instance.
|
String |
getDisplayName()
Unless this object has additional web presence, display name is not used at all.
|
String |
getUrl()
Obtains the URL of this object, excluding the context path.
|
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
public static final List<PageDecorator> ALL
protected PageDecorator(Class<? extends PageDecorator> yourClass)
yourClass
- pass-in "this.getClass()" (except that the constructor parameters cannot use 'this',
so you'd have to hard-code the class name.protected PageDecorator()
public final Descriptor<PageDecorator> getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass()
then by default
a.getDescriptor() == b.getDescriptor()
as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor
in interface Describable<PageDecorator>
public String getDisplayName()
getDisplayName
in class Descriptor<PageDecorator>
public final String getUrl()
Every PageDecorator
is bound to URL via Jenkins.getDescriptor()
.
This method returns such an URL.
public static ExtensionList<PageDecorator> all()
PageDecorator
descriptors.Copyright © 2016. All rights reserved.