|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwater.api.RequestBuilders.Builder
public abstract static class RequestBuilders.Builder
An abstract class to build the HTML page automatically from JSON. The idea is that every JSON element in the response structure (dot separated) may be a unique context that might be displayed in a different way. By creating specialized builders and assigning them to the JSON element contexts you can build arbitrarily complex HTML page. The basic builders for elements, arrays, array rows and elements inside array rows are provided by default. Each builder can also specify default builders for its components to make sure for instance that tables in arrays do not recurse and so on.
Constructor Summary | |
---|---|
RequestBuilders.Builder()
|
Method Summary | |
---|---|
static java.lang.String |
addToContext(java.lang.String oldContext,
java.lang.String name)
Adds the given element name to the existing context. |
abstract java.lang.String |
build(RequestBuilders.Response response,
com.google.gson.JsonElement element,
java.lang.String contextName)
Override this method to provide HTML for the given json element. |
RequestBuilders.Builder |
defaultBuilder(com.google.gson.JsonElement element)
Returns the default builders. |
static java.lang.String |
elementName(java.lang.String context)
For a given context returns the element name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestBuilders.Builder()
Method Detail |
---|
public abstract java.lang.String build(RequestBuilders.Response response, com.google.gson.JsonElement element, java.lang.String contextName)
public static java.lang.String addToContext(java.lang.String oldContext, java.lang.String name)
public static java.lang.String elementName(java.lang.String context)
public RequestBuilders.Builder defaultBuilder(com.google.gson.JsonElement element)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |