Class 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 by StaplerRequest.findAncestorObject(Class) at runtime.
    • Constructor Detail

      • ArtifactsDocLinksDocument

        public ArtifactsDocLinksDocument​(String id,
                                         String artifactName,
                                         String title,
                                         String initialPath,
                                         String indexFile)
        Parameters:
        id -
        artifactName -
        title -
        initialPath -
        indexFile -
    • 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.
      • getBuild

        protected AbstractBuild<?,​?> getBuild​(org.kohsuke.stapler.StaplerRequest req)
        Resolves the build containing the artifact by StaplerRequest.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