hudson.model
Class PageDecorator

java.lang.Object
  extended by hudson.model.Descriptor<PageDecorator>
      extended by hudson.model.PageDecorator
All Implemented Interfaces:
ExtensionPoint, Describable<PageDecorator>, Saveable
Direct Known Subclasses:
DownloadService, UpdateCenter.PageDecoratorImpl, UsageStatistics

public abstract class PageDecorator
extends Descriptor<PageDecorator>
implements ExtensionPoint, Describable<PageDecorator>

Participates in the rendering of HTML pages for all pages of Hudson.

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.

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. See Descriptor 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.

Since:
1.235
Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static List<PageDecorator> ALL
          Deprecated. as of 1.286 Use all() for read access, and use Extension for registration.
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Method Summary
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.
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final List<PageDecorator> ALL
Deprecated. as of 1.286 Use all() for read access, and use Extension for registration.
All the registered instances.

Method Detail

getDescriptor

public final Descriptor<PageDecorator> getDescriptor()
Description copied from interface: Describable
Gets the descriptor for this instance.

Descriptor is a singleton for every concrete Describable implementation, so if a.getClass()==b.getClass() then a.getDescriptor()==b.getDescriptor() must hold.

Specified by:
getDescriptor in interface Describable<PageDecorator>

getDisplayName

public String getDisplayName()
Unless this object has additional web presence, display name is not used at all. So default to "".

Specified by:
getDisplayName in class Descriptor<PageDecorator>

getUrl

public final String getUrl()
Obtains the URL of this object, excluding the context path.

Every PageDecorator is bound to URL via Hudson.getDescriptor(). This method returns such an URL.


all

public static ExtensionList<PageDecorator> all()
Returns all the registered PageDecorator descriptors.



Copyright © 2004-2013 Hudson. All Rights Reserved.