Package hudson.model

Class PageDecorator

  • All Implemented Interfaces:
    ExtensionPoint, Describable<PageDecorator>, Saveable, Loadable, OnMaster
    Direct Known Subclasses:
    AdministrativeMonitorsDecorator, FormElementPathPageDecorator, FrameOptionsPageDecorator, SetupWizard, 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 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.

    Associated Views


    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.
    Kohsuke Kawaguchi
    • Constructor Detail

      • PageDecorator

        protected PageDecorator​(Class<? extends PageDecorator> yourClass)
        as of 1.425 Use the default constructor that's less error prone
        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()