public abstract class PageDecorator extends Descriptor<PageDecorator> implements ExtensionPoint, Describable<PageDecorator>
This class provides a few hooks to augment 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.
Plugins that contribute this extension point
should implement a new decorator and put Extension
on the class.
Descriptor
for more about this. Optional.
</body>
tag. Convenient place for adding tracking beacons, etc.
</head>
tag. Convenient place for additional stylesheet,
<meta>
tags, etc.
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 |
getUrl()
Obtains the URL of this object, excluding the context path.
|
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
@Deprecated public static final List<PageDecorator> ALL
@Deprecated 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 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 © 2004–2022. All rights reserved.