Class ArtifactExplorerAction

java.lang.Object
io.jenkins.plugins.artifactexplorer.ArtifactExplorerAction
All Implemented Interfaces:
Action, ModelObject
Direct Known Subclasses:
ArtifactExplorerAction.UserContentExplorerAction

public class ArtifactExplorerAction extends Object implements Action
The explorer page for one build (or controller /userContent/), plus the small JSON API its script uses.

Served at <build>/artifact-explorer/ (and /userContent-explorer/). ArtifactExplorerFilter forwards classic <build>/artifact/<dir>/ and /userContent/<dir>/ requests here so the old URL shows the explorer.

  • Constructor Details

    • ArtifactExplorerAction

      public ArtifactExplorerAction(@CheckForNull Run<?,?> run)
  • Method Details

    • getRun

      @CheckForNull public Run<?,?> getRun()
    • getObject

      @CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Run<?,?> getObject()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getInitialPath

      public String getInitialPath()
      Directory to show initially: set by the filter, or given as ?path= when visited directly.
    • getBuildUrl

      public String getBuildUrl()
      URL of the build page, with a trailing slash and the context path.
    • getArtifactRootUrl

      public String getArtifactRootUrl()
      URL of the raw artifact / directory root (<build>/artifact/ or /userContent/).
    • getExplorerRootUrl

      public String getExplorerRootUrl()
      URL of the JSON API / explorer endpoint (<build>/artifact-explorer/ or /userContent-explorer/).
    • getMaxEntries

      public int getMaxEntries()
    • root

      @CheckForNull protected VirtualFile root()
    • checkAccess

      protected void checkAccess()
    • doTree

      @GET public org.kohsuke.stapler.HttpResponse doTree(@QueryParameter String path) throws IOException
      GET tree?path=a/b: direct children of a directory.
      Throws:
      IOException
    • doSearchIndex

      @GET public org.kohsuke.stapler.HttpResponse doSearchIndex() throws IOException
      GET searchIndex: every file path in the build, for client side search.
      Throws:
      IOException
    • doPreview

      @GET public org.kohsuke.stapler.HttpResponse doPreview(@QueryParameter String path) throws IOException
      GET preview?path=a/b.txt: metadata, bounded UTF-8 text preview, and optional CommonMark HTML.
      Throws:
      IOException
    • doSha256

      @GET public org.kohsuke.stapler.HttpResponse doSha256(@QueryParameter String path) throws IOException
      GET sha256?path=a/b.txt: lowercase SHA-256 hex digest of a single file.
      Throws:
      IOException