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.

    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.

    httpHeaders.jelly

    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.
    Since:
    1.235
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • PageDecorator

        @Deprecated
        protected PageDecorator​(Class<? extends PageDecorator> yourClass)
        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()