Class RESTFetchPreloader

java.lang.Object
io.jenkins.blueocean.commons.PageStatePreloader
io.jenkins.blueocean.preload.RESTFetchPreloader
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
BlueRunChangesetPreloader, FavoritesStatePreloader, PipelineActivityStatePreloader, PipelineBranchRunStatePreloader, PipelineStatePreloader

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public abstract class RESTFetchPreloader extends io.jenkins.blueocean.commons.PageStatePreloader
REST prefetch data preloader.

Pre-populates the page with REST data, allowing the client side Fetch module (see Fetch module in the @jenkins-cd/blueocean-core-js NPM packages) to avoid the REST API call overhead.

Create implementations of this class (and annotate with @Extension) for data that we know is going to be needed by the page.

Author:
tom.fennelly@gmail.com
  • Constructor Details

    • RESTFetchPreloader

      public RESTFetchPreloader()
  • Method Details

    • getStatePropertyPath

      public final String getStatePropertyPath()
      Specified by:
      getStatePropertyPath in class io.jenkins.blueocean.commons.PageStatePreloader
    • getStateJson

      public final String getStateJson()
      Specified by:
      getStateJson in class io.jenkins.blueocean.commons.PageStatePreloader
    • getFetchData

      protected abstract RESTFetchPreloader.FetchData getFetchData(@NonNull BlueUrlTokenizer blueUrl)