Class PageDecorator
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,Saveable
,Loadable
,OnMaster
- Direct Known Subclasses:
AdministrativeMonitorsDecorator
,FormElementPathPageDecorator
,FrameOptionsPageDecorator
,SetupWizard
,UsageStatistics
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.
Life-cycle
Plugins that contribute this extension point
should implement a new decorator and put Extension
on the class.
Associated Views
global.jelly
If this extension point needs to expose a global configuration, write this jelly page. SeeDescriptor
for more about this. Optional.
footer.jelly
This page is added right before the</body>
tag. Convenient place for adding tracking beacons, etc.
header.jelly
This page is added right before the</head>
tag. Convenient place for additional stylesheet,
<meta>
tags, etc.
httpHeaders.jelly
This is a generalization of theX-Jenkins
header that aids auto-discovery.
This fragment can write additional <st:header name="…" value="…"/>
tags that go along with it.- Since:
- 1.235
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
PageDecorator
(Class<? extends PageDecorator> yourClass) Deprecated.as of 1.425 Use the default constructor that's less error prone -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<PageDecorator>
all()
Returns all the registeredPageDecorator
descriptors.final Descriptor<PageDecorator>
Gets the descriptor for this instance.final String
getUrl()
Obtains the URL of this object, excluding the context path.Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, 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, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
ALL
All the registered instances.
-
-
Constructor Details
-
PageDecorator
Deprecated.as of 1.425 Use the default constructor that's less error prone- Parameters:
yourClass
- pass-in "this.getClass()" (except that the constructor parameters cannot use 'this', so you'd have to hard-code the class name.
-
PageDecorator
protected PageDecorator()
-
-
Method Details
-
getDescriptor
Description copied from interface:Describable
Gets the descriptor for this instance.Descriptor
is a singleton for every concreteDescribable
implementation, so ifa.getClass() == b.getClass()
then by defaulta.getDescriptor() == b.getDescriptor()
as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptor
in interfaceDescribable<PageDecorator>
-
getUrl
Obtains the URL of this object, excluding the context path.Every
PageDecorator
is bound to URL viaJenkins.getDescriptor()
. This method returns such an URL. -
all
Returns all the registeredPageDecorator
descriptors.
-
all()
for read access, and useExtension
for registration.