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 void
doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp)
Send a contents of the artifact that is requested via HTTP.String
getArtifactName()
protected AbstractBuild<?,?>
getBuild(org.kohsuke.stapler.StaplerRequest req)
Resolves the build containing the artifact byStaplerRequest.findAncestorObject(Class)
String
getDisplayName()
String
getId()
String
getIndexFile()
String
getInitialPath()
String
getTitle()
String
getUrl()
static boolean
isDirectory(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:
getDisplayName
in 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.ServletException
Send a contents of the artifact that is requested via HTTP.- Parameters:
req
-resp
-- Throws:
IOException
javax.servlet.ServletException
-
isDirectory
public static boolean isDirectory(ZipFile zip, String path) throws IOException
- Parameters:
zip
-path
-- Returns:
- Throws:
IOException
-
-