Class WeblinkService


  • @Path("/weblink")
    @Singleton
    public class WeblinkService
    extends AbstractWeblinkService
    This JAX-RS resource represents the content service. URL: /weblink.
    Author:
    dam
    • Constructor Detail

      • WeblinkService

        public WeblinkService()
    • Method Detail

      • generate

        @GET
        @Path("/url")
        @Produces("application/octet-stream")
        public javax.ws.rs.core.Response generate​(@Context
                                                  javax.ws.rs.core.UriInfo info,
                                                  @Context
                                                  javax.servlet.http.HttpServletRequest request,
                                                  @Context
                                                  WeblinkParameter params)
        Generates weblink url.
        Parameters:
        info - the UriInfo
        request - the HttpServletRequest
        params - the WeblinkParameter injected by WeblinkParameterFactory
        Returns:
        the response
      • getContentWithoutFilename

        @GET
        @Path("/{archive}/{field}/{id}/{element}")
        @Produces("application/octet-stream")
        public javax.ws.rs.core.Response getContentWithoutFilename​(@Context
                                                                   javax.ws.rs.core.UriInfo info,
                                                                   @Context
                                                                   javax.servlet.http.HttpServletRequest request,
                                                                   @Context
                                                                   WeblinkParameter params)
        Retrieves the requested document element and returns it as a download attachment. Filename of downloaded attachment is generated by the element fullname.
        Parameters:
        info - the info
        request - the request
        params - the params
        Returns:
        the content without filename
      • getContent

        @GET
        @Path("/{archive}/{field}/{id}/{element}/{filename}")
        @Produces("application/octet-stream")
        public javax.ws.rs.core.Response getContent​(@Context
                                                    javax.ws.rs.core.UriInfo info,
                                                    @Context
                                                    javax.servlet.http.HttpServletRequest request,
                                                    @Context
                                                    WeblinkParameter params)
        Retrieves the requested document element and returns it as a download attachment.
        Parameters:
        info - the info
        request - injected HttpServletRequest
        params - the params
        Returns:
        processing dependent Response.