Package org.silverpeas.core.webapi.media
Class EmbedMediaPlayerDispatcher
- java.lang.Object
-
- org.silverpeas.core.webapi.media.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 pluginSupportedWebPlugin.Constants.EMBEDPLAYER
.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
dispatchWithSilverpeasFile(SilverpeasFile file)
Dispatches the current request to embed media player services if the (EMBED_PLAYER_PARAMETER
) of the request is set totrue
.static EmbedMediaPlayerDispatcher
from(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Initializing the file response context.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 totrue
.
-
-
-
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 totrue
.- 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 totrue
.- Parameters:
file
- the silverpeas file to take into account into dispatch operation.- Returns:
Response.ResponseBuilder
if a redirect is necessary, null otherwise.
-
-