|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.isdc.wro.http.handler.RequestHandlerSupport ro.isdc.wro.extensions.http.handler.ModelAsJsonRequestHandler
public class ModelAsJsonRequestHandler
Expose the WroModel
as JSON when the following uri is accessed: "wroAPI/model". This RequestHandler
is useful to inspect the model and to simulate the behavior of the page when all resources are included (one by one)
without being merged.
Field Summary | |
---|---|
static String |
ALIAS
The alias of this RequestHandler used for configuration. |
static String |
ENDPOINT_URI
API - reload cache method call |
Fields inherited from class ro.isdc.wro.http.handler.RequestHandlerSupport |
---|
PATH_API |
Constructor Summary | |
---|---|
ModelAsJsonRequestHandler()
|
Method Summary | |
---|---|
boolean |
accept(javax.servlet.http.HttpServletRequest request)
Determines if current request can be handled by this requestHandler |
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle the given request, generating a response. |
boolean |
isEnabled()
Used to determine if the RequestHandler is enabled |
protected com.google.gson.Gson |
newGson(javax.servlet.http.HttpServletRequest request)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ENDPOINT_URI
public static final String ALIAS
RequestHandler
used for configuration.
Constructor Detail |
---|
public ModelAsJsonRequestHandler()
Method Detail |
---|
public void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
handle
in interface RequestHandler
handle
in class RequestHandlerSupport
request
- current HTTP requestresponse
- current HTTP response
IOException
- in case of I/O errorsprotected com.google.gson.Gson newGson(javax.servlet.http.HttpServletRequest request)
Gson
instance.public boolean accept(javax.servlet.http.HttpServletRequest request)
accept
in interface RequestHandler
accept
in class RequestHandlerSupport
request
- current HTTP request
public boolean isEnabled()
isEnabled
in interface RequestHandler
isEnabled
in class RequestHandlerSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |