Class MediaResource
java.lang.Object
io.goobi.viewer.api.rest.v1.media.MediaResource
A rest resource for delivering video and audio files.
- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAccess(String action, String pi, String contentFilename) checkAccess.serveAudioContent(String format, String filename) serveMediaContent.serveVideoContent(String format, String filename) serveMediaContent.
-
Constructor Details
-
MediaResource
-
-
Method Details
-
serveAudioContent
@GET @Path("/audio/{mimetype}/{filename}") public String serveAudioContent(@PathParam("mimetype") String format, @PathParam("filename") String filename) throws PresentationException, IndexUnreachableException, AccessDeniedException serveMediaContent.
- Parameters:
format- aStringobject.filename- aStringobject.- Returns:
- a
Stringobject. - Throws:
PresentationException- if any.IndexUnreachableException- if any.AccessDeniedException- if any.
-
serveVideoContent
@GET @Path("/video/{mimetype}/{filename}") public String serveVideoContent(@PathParam("mimetype") String format, @PathParam("filename") String filename) throws PresentationException, IndexUnreachableException, jakarta.ws.rs.WebApplicationException serveMediaContent.
- Parameters:
format- aStringobject.filename- aStringobject.- Returns:
- a
Stringobject. - Throws:
PresentationException- if any.IndexUnreachableException- if any.AccessDeniedException- if any.jakarta.ws.rs.WebApplicationException
-
checkAccess
public void checkAccess(String action, String pi, String contentFilename) throws jakarta.ws.rs.WebApplicationException checkAccess.
- Parameters:
action- aStringobject.pi- aStringobject.contentFilename- aStringobject.- Throws:
AccessDeniedException- if any.jakarta.ws.rs.WebApplicationException
-