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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAccess
(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
- aString
object.filename
- aString
object.- Returns:
- a
String
object. - 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, javax.ws.rs.WebApplicationException serveMediaContent.
- Parameters:
format
- aString
object.filename
- aString
object.- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.AccessDeniedException
- if any.javax.ws.rs.WebApplicationException
-
checkAccess
public void checkAccess(String action, String pi, String contentFilename) throws javax.ws.rs.WebApplicationException checkAccess.
- Parameters:
action
- aString
object.pi
- aString
object.contentFilename
- aString
object.- Throws:
AccessDeniedException
- if any.javax.ws.rs.WebApplicationException
-