Class ObjectResource
java.lang.Object
io.goobi.viewer.api.rest.v1.records.media.ObjectResource
ObjectResource class.
- Author:
- Florian Alpers
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionObjectResource
(javax.ws.rs.container.ContainerRequestContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AbstractApiUrlManager urls, String pi, String filename) -
Method Summary
Modifier and TypeMethodDescriptiongetInfo
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) getInfo.javax.ws.rs.core.StreamingOutput
getObject
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) getObject.javax.ws.rs.core.StreamingOutput
getObjectResource
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pi, String subfolder, String auxfilename) getObjectResource.javax.ws.rs.core.StreamingOutput
getObjectResource
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pi, String subfolder1, String subfolder2, String auxfilename) getObjectResource.javax.ws.rs.core.StreamingOutput
getObjectResource2
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pi, String subfolder, String auxfilename) getObjectResource2.javax.ws.rs.core.StreamingOutput
getObjectResource2
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String pi, String subfolder1, String subfolder2, String auxfilename) getObjectResource2.
-
Constructor Details
-
ObjectResource
public ObjectResource(@Context javax.ws.rs.container.ContainerRequestContext context, @Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @Context AbstractApiUrlManager urls, @PathParam("pi") String pi, @PathParam("filename") String filename) - Parameters:
context
-request
-response
-urls
-pi
-filename
-
-
-
Method Details
-
getInfo
@GET @Path("/info.json") @Produces("application/json") public ObjectInfo getInfo(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response) throws PresentationException, IndexUnreachableException getInfo.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.- Returns:
- a
ObjectInfo
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getObject
@GET @Produces("application/octet-stream") public javax.ws.rs.core.StreamingOutput getObject(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response) throws IOException, PresentationException, IndexUnreachableException getObject.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.- Returns:
- a
StreamingOutput
object. - Throws:
IOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getObjectResource
@GET @Path("/{subfolder}/{auxfilename}") @Produces("application/octet-stream") public javax.ws.rs.core.StreamingOutput getObjectResource(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @PathParam("pi") String pi, @PathParam("subfolder") String subfolder, @PathParam("auxfilename") String auxfilename) throws IOException, PresentationException, IndexUnreachableException getObjectResource.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.pi
- aString
object.subfolder
- aString
object.auxfilename
- aString
object.- Returns:
- a
StreamingOutput
object. - Throws:
IOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getObjectResource2
@GET @Path("/{subfolder}//{auxfilename}") @Produces("application/octet-stream") public javax.ws.rs.core.StreamingOutput getObjectResource2(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @PathParam("pi") String pi, @PathParam("subfolder") String subfolder, @PathParam("auxfilename") String auxfilename) throws IOException, PresentationException, IndexUnreachableException getObjectResource2.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.pi
- aString
object.subfolder
- aString
object.auxfilename
- aString
object.- Returns:
- a
StreamingOutput
object. - Throws:
IOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getObjectResource
@GET @Path("/{subfolder}/{subsubfolder}/{auxfilename}") @Produces("application/octet-stream") public javax.ws.rs.core.StreamingOutput getObjectResource(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @PathParam("pi") String pi, @PathParam("subfolder") String subfolder1, @PathParam("subsubfolder") String subfolder2, @PathParam("auxfilename") String auxfilename) throws IOException, PresentationException, IndexUnreachableException getObjectResource.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.pi
- aString
object.subfolder1
- aString
object.subfolder2
- aString
object.auxfilename
- aString
object.- Returns:
- a
StreamingOutput
object. - Throws:
IOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getObjectResource2
@GET @Path("//{subfolder}/{subsubfolder}/{auxfilename}") @Produces("application/octet-stream") public javax.ws.rs.core.StreamingOutput getObjectResource2(@Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @PathParam("pi") String pi, @PathParam("subfolder") String subfolder1, @PathParam("subsubfolder") String subfolder2, @PathParam("auxfilename") String auxfilename) throws IOException, PresentationException, IndexUnreachableException getObjectResource2.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.pi
- aString
object.subfolder1
- aString
object.subfolder2
- aString
object.auxfilename
- aString
object.- Returns:
- a
StreamingOutput
object. - Throws:
IOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-