Class ArtifactsDocLinksDocument
- java.lang.Object
-
- hudson.plugins.doclinks.artifacts.ArtifactsDocLinksDocument
-
- All Implemented Interfaces:
ModelObject
public class ArtifactsDocLinksDocument extends Object implements ModelObject
Holds a link to an artifact published as a document. The build that holds the artifact is resolved byStaplerRequest.findAncestorObject(Class)at runtime.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp)Send a contents of the artifact that is requested via HTTP.StringgetArtifactName()protected AbstractBuild<?,?>getBuild(org.kohsuke.stapler.StaplerRequest req)Resolves the build containing the artifact byStaplerRequest.findAncestorObject(Class)StringgetDisplayName()StringgetId()StringgetIndexFile()StringgetInitialPath()StringgetTitle()StringgetUrl()static booleanisDirectory(ZipFile zip, String path)
-
-
-
Method Detail
-
getArtifactName
public String getArtifactName()
- Returns:
- the artifactName
-
getTitle
public String getTitle()
- Returns:
- the title
-
getInitialPath
public String getInitialPath()
- Returns:
- the initialPath
-
getIndexFile
public String getIndexFile()
- Returns:
- the indexFile
-
getId
public String getId()
- Returns:
- the id used in URL.
-
getUrl
public String getUrl()
- Returns:
- the URL for the initial path.
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject- Returns:
- See Also:
ModelObject.getDisplayName()
-
getBuild
protected AbstractBuild<?,?> getBuild(org.kohsuke.stapler.StaplerRequest req)
Resolves the build containing the artifact byStaplerRequest.findAncestorObject(Class)- Parameters:
req-- Returns:
-
doDynamic
public void doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp) throws IOException, javax.servlet.ServletExceptionSend a contents of the artifact that is requested via HTTP.- Parameters:
req-resp-- Throws:
IOExceptionjavax.servlet.ServletException
-
isDirectory
public static boolean isDirectory(ZipFile zip, String path) throws IOException
- Parameters:
zip-path-- Returns:
- Throws:
IOException
-
-