Class RequestState

java.lang.Object
com.atlassian.plugin.webresource.impl.RequestState

public class RequestState extends Object
State maintained during single request.
Since:
3.3
  • Constructor Details

  • Method Details

    • clearIncludedAndUpdateExcluded

      public void clearIncludedAndUpdateExcluded(@Nonnull ResourcePhase resourcePhase, @Nonnull Set<String> excludedResolved)
      Called after generating urls, to clear current state and remember already included resources.
    • deepClone

      @Nonnull public RequestState deepClone()
    • getRequestCache

      @Nonnull public RequestCache getRequestCache()
    • getExcluded

      @Nonnull @Deprecated public LinkedHashSet<String> getExcluded()
      Deprecated.
      See Also:
    • getExcludedData

      @Nonnull public Set<String> getExcludedData()
    • getIncluded

      @Nonnull @Deprecated public LinkedHashSet<String> getIncluded()
      Deprecated.
      See Also:
    • getIncluded

      @Nonnull @Deprecated public LinkedHashSet<String> getIncluded(@Nonnull ResourcePhase phaseType)
      Deprecated.
      See Also:
    • getIncludedData

      @Nonnull public LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> getIncludedData()
    • getIncludedData

      @Nonnull public LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> getIncludedData(@Nonnull ResourcePhase resourcePhase)
    • getExcludedResolved

      @Nonnull public Set<String> getExcludedResolved()
      Most UI code is not written to be idempotent, so content for each Requestable should only ever be served to the UI once. Use this list to avoid incurring the full graph traversal cost each time you need the complete list of "already used" content, such as:
      • Bailing faster in graph traversal if an item in this list is encountered,
      • Identifying content sets that would cause something to be served twice,
      • Avoiding serving "empty" content sets once accounting for this list,
      • and so on.
      Since:
      5.5
      See Also:
    • getGlobals

      @Nonnull @Deprecated public Globals getGlobals()
      Deprecated.
      since 5.0.0. There is no replacement. Don't use god objects.
    • getRawRequest

      public RawRequest getRawRequest()
    • getSnapshot

      @Nonnull public Snapshot getSnapshot()
      Get all bundles.

      It is another layer of cache over the 'globals.getBundles()' because it is used very heavily, to avoid any performance drawbacks of atomic reference in the 'globals.getBundles()'.

    • isAutoIncludeFrontendRuntimeEnabled

      public boolean isAutoIncludeFrontendRuntimeEnabled()
      Whether to automatically include frontend runtime modules (e.g., WRM.require, WRM.data) automatically when the feature is used.
      Returns:
      true if modules should be automatically included; false if they should be manually required.
      Since:
      5.5.0
    • getUrlStrategy

      public UrlBuildingStrategy getUrlStrategy()
    • getSuperbatchConfiguration

      public SuperbatchConfiguration getSuperbatchConfiguration()
    • setSyncbatchEnabled

      public void setSyncbatchEnabled(boolean enabled)
    • isSyncbatchEnabled

      public boolean isSyncbatchEnabled()
    • toString

      public String toString()
      Overrides:
      toString in class Object