public abstract class RESTFetchPreloader extends PageStatePreloader
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
RESTFetchPreloader.FetchData |
| Constructor and Description |
|---|
RESTFetchPreloader() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract RESTFetchPreloader.FetchData |
getFetchData(BlueUrlTokenizer blueUrl) |
String |
getStateJson()
Get the state JSON to be set in the page's JavaScript blueocean global scope.
|
String |
getStatePropertyPath()
Get the JavaScript object graph path at shiwh the state is to be stored.
|
alladdDependency, dependsOn, execute, getDependencies, getDescription, getIf, getLocation, getName, getProject, getTasks, getUnless, parseDepends, performTasks, setDepends, setDescription, setIf, setLocation, setName, setProject, setUnless, toStringpublic final String getStatePropertyPath()
getStatePropertyPath in class PageStatePreloaderpublic final String getStateJson()
getStateJson in class PageStatePreloadernull if no data is to be set of this page.protected abstract RESTFetchPreloader.FetchData getFetchData(@Nonnull BlueUrlTokenizer blueUrl)
Copyright © 2016–2017. All rights reserved.