Class ArtifactExplorerAction
java.lang.Object
io.jenkins.plugins.artifactexplorer.ArtifactExplorerAction
- All Implemented Interfaces:
Action,ModelObject
- Direct Known Subclasses:
ArtifactExplorerAction.UserContentExplorerAction
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRoot action backing the<jenkinsurl>/userContent/directory browser replacement. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidorg.kohsuke.stapler.HttpResponseGET preview?path=a/b.txt: metadata, bounded UTF-8 text preview, and optional CommonMark HTML.org.kohsuke.stapler.HttpResponseGET searchIndex: every file path in the build, for client side search.org.kohsuke.stapler.HttpResponseGET sha256?path=a/b.txt: lowercase SHA-256 hex digest of a single file.org.kohsuke.stapler.HttpResponseGET tree?path=a/b: direct children of a directory.URL of the raw artifact / directory root (<build>/artifact/or/userContent/).URL of the build page, with a trailing slash and the context path.URL of the JSON API / explorer endpoint (<build>/artifact-explorer/or/userContent-explorer/).Directory to show initially: set by the filter, or given as?path=when visited directly.intRun<?, ?> Run<?, ?> getRun()protected VirtualFileroot()
-
Constructor Details
-
ArtifactExplorerAction
-
-
Method Details
-
getRun
-
getObject
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Run<?,?> getObject() -
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getInitialPath
Directory to show initially: set by the filter, or given as?path=when visited directly. -
getBuildUrl
URL of the build page, with a trailing slash and the context path. -
getArtifactRootUrl
URL of the raw artifact / directory root (<build>/artifact/or/userContent/). -
getExplorerRootUrl
URL of the JSON API / explorer endpoint (<build>/artifact-explorer/or/userContent-explorer/). -
getMaxEntries
public int getMaxEntries() -
root
-
checkAccess
protected void checkAccess() -
doTree
GET tree?path=a/b: direct children of a directory.- Throws:
IOException
-
doSearchIndex
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
-