Package io.goobi.viewer.api.rest.model
Class MediaResourceHelper
java.lang.Object
io.goobi.viewer.api.rest.model.MediaResourceHelper
Helper class for serving media resources via the REST API, handling content-type detection,
redirect decisions, and HTTP response header configuration based on viewer media-type settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRedirectUrl(String pi, String filename) setContentHeaders(HttpServletResponse servletResponse, String filename, Path path) booleanshouldRedirect(String filename)
-
Constructor Details
-
MediaResourceHelper
-
-
Method Details
-
shouldRedirect
- Throws:
IOException
-
getRedirectUrl
- Throws:
IOException
-
setContentHeaders
public String setContentHeaders(HttpServletResponse servletResponse, String filename, Path path) throws IOException - Throws:
IOException
-