Class EmbedMediaPlayerDispatcher


  • public class EmbedMediaPlayerDispatcher
    extends Object
    From a Servlet or a Web Service, this class handles the forwarding of the request to the media embed player services.
    The data necessary to perform this operation are set by the JavasScript plugin SupportedWebPlugin.Constants.EMBEDPLAYER.
    Author:
    Yohann Chastagnier
    • Method Detail

      • from

        public static EmbedMediaPlayerDispatcher from​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
        Initializing the file response context.
        Parameters:
        request - the current request.
        response - the current response.
        Returns:
        the initialized file response.
      • dispatchWithSilverpeasFile

        public boolean dispatchWithSilverpeasFile​(SilverpeasFile file)
        Dispatches the current request to embed media player services if the (EMBED_PLAYER_PARAMETER) of the request is set to true.
        Parameters:
        file - the silverpeas file to take into account into dispatch operation.
        Returns:
        true the dispatching has been performed (explicit forward), false otherwise.
      • seeOtherWithSilverpeasFile

        public javax.ws.rs.core.Response.ResponseBuilder seeOtherWithSilverpeasFile​(SilverpeasFile file)
        Returns response builder to redirect to embed media player services if the (EMBED_PLAYER_PARAMETER) of the request is set to true.
        Parameters:
        file - the silverpeas file to take into account into dispatch operation.
        Returns:
        Response.ResponseBuilder if a redirect is necessary, null otherwise.