mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
added PushStateDispatcher for production and development to WebResourceServlet
This commit is contained in:
28
scm-webapp/src/main/java/sonia/scm/PushStateDispatcher.java
Normal file
28
scm-webapp/src/main/java/sonia/scm/PushStateDispatcher.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package sonia.scm;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* The PushStateDispatcher is responsible for dispatching the request, to the main entry point of the ui, if no resource
|
||||
* could be found for the requested path. This allows us the implementation of a ui which work with "pushstate" of
|
||||
* html5.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">HTML5 Push State</a>
|
||||
*/
|
||||
public interface PushStateDispatcher {
|
||||
|
||||
/**
|
||||
* Dispatches the request to the main entry point of the ui.
|
||||
*
|
||||
* @param request http request
|
||||
* @param response http response
|
||||
* @param uri request uri
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
void dispatch(HttpServletRequest request, HttpServletResponse response, String uri) throws IOException;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user