Class HttpDownloadProcessor
- java.lang.Object
-
- jetbrains.buildServer.controllers.HttpDownloadProcessor
-
public class HttpDownloadProcessor extends Object
Processes file download request- Since:
- 5.1
- Author:
- Eugene Petrenko, Maxim Manuylov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
HttpDownloadProcessor.FileInfo
-
Constructor Summary
Constructors Constructor Description HttpDownloadProcessor(DigestCalculator digestCalculator, ExtensionsProvider extensionsProvider, DomainIsolationProtection domainIsolationProtection)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.springframework.web.servlet.ModelAndView
processArtifactDownload(SBuild build, BuildArtifact artifact, boolean setContentDisposition, String forcedETagContent, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Processes request to download content of the specified build's artifact and writes the response.org.springframework.web.servlet.ModelAndView
processArtifactDownload(SBuild build, BuildArtifact artifact, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
performs all necessary operations to send build artifact contents into response.org.springframework.web.servlet.ModelAndView
processDownload(HttpDownloadProcessor.FileInfo info, boolean contentDisposition, boolean restrictMimeTypes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
org.springframework.web.servlet.ModelAndView
processDownload(HttpDownloadProcessor.FileInfo info, boolean contentDisposition, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Deprecated.org.springframework.web.servlet.ModelAndView
processFileDownload(File file, boolean contentDisposition, boolean restrictMimeTypes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Counter loadMetric)
performs all necessary operations to send file contents into response.org.springframework.web.servlet.ModelAndView
processFileDownload(File file, boolean contentDisposition, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServerLoadMetrics metrics)
Deprecated.org.springframework.web.servlet.ModelAndView
processFileDownload(File file, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Deprecated.
-
-
-
Constructor Detail
-
HttpDownloadProcessor
public HttpDownloadProcessor(@NotNull DigestCalculator digestCalculator, @NotNull ExtensionsProvider extensionsProvider, @NotNull DomainIsolationProtection domainIsolationProtection)
-
-
Method Detail
-
processFileDownload
@Nullable @Deprecated public org.springframework.web.servlet.ModelAndView processFileDownload(@NotNull File file, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) throws IOException
Deprecated.performs all necessary operations to send file contents into response.- Parameters:
file
- file to sendrequest
- original requestresponse
- response- Returns:
- spring model and view to return from controller
- Throws:
IOException
- on response or file IO errors
-
processFileDownload
@Nullable @Deprecated public org.springframework.web.servlet.ModelAndView processFileDownload(@NotNull File file, boolean contentDisposition, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @Nullable ServerLoadMetrics metrics) throws IOException
Deprecated.This method is used in StaticUIExtensions, StaticPageContentController. Left here for compatibility- Throws:
IOException
-
processFileDownload
@Nullable public org.springframework.web.servlet.ModelAndView processFileDownload(@NotNull File file, boolean contentDisposition, boolean restrictMimeTypes, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @Nullable Counter loadMetric) throws IOException
performs all necessary operations to send file contents into response.- Parameters:
file
- file to sendrequest
- original requestresponse
- responsecontentDisposition
- whether Content-Disposition header should be set or notrestrictMimeTypes
- 'false' to use all known mime types (should only be used for serving files coming from trusted sources), 'true' to select from "text/plain" : "application/octet-stream"- Returns:
- spring model and view to return from controller
- Throws:
IOException
- on response or file IO errors
-
processArtifactDownload
@Nullable public org.springframework.web.servlet.ModelAndView processArtifactDownload(@NotNull SBuild build, @NotNull BuildArtifact artifact, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) throws IOException
performs all necessary operations to send build artifact contents into response.- Parameters:
artifact
- file to sendrequest
- original requestresponse
- response- Returns:
- spring model and view to return from controller
- Throws:
IOException
- on response or file IO errors
-
processArtifactDownload
@Nullable public org.springframework.web.servlet.ModelAndView processArtifactDownload(@NotNull SBuild build, @NotNull BuildArtifact artifact, boolean setContentDisposition, @Nullable String forcedETagContent, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) throws IOException
Processes request to download content of the specified build's artifact and writes the response.- Parameters:
build
- build to serve artifact formartifact
- build's artifact to servesetContentDisposition
- if "true", "Content-Disposition" header will be setforcedETagContent
- if set, the value of the strong ETag to use. If null, default ETag calculation will be usedrequest
- original requestresponse
- response- Returns:
- spring model and view to return from controller
- Throws:
IOException
- on response or file IO errors- Since:
- 2017.1
-
processDownload
@Deprecated public org.springframework.web.servlet.ModelAndView processDownload(@NotNull HttpDownloadProcessor.FileInfo info, boolean contentDisposition, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) throws IOException
Deprecated.- Throws:
IOException
-
processDownload
public org.springframework.web.servlet.ModelAndView processDownload(@NotNull HttpDownloadProcessor.FileInfo info, boolean contentDisposition, boolean restrictMimeTypes, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) throws IOException
- Parameters:
restrictMimeTypes
- 'false' to use all known mime types (should only be used for serving files coming from trusted sources), 'true' to select from "text/plain" : "application/octet-stream"- Throws:
IOException
-
-