|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.terminal.gwt.server.BootstrapHandler
public abstract class BootstrapHandler
Nested Class Summary | |
---|---|
protected class |
BootstrapHandler.BootstrapContext
|
Constructor Summary | |
---|---|
BootstrapHandler()
|
Method Summary | |
---|---|
BootstrapHandler.BootstrapContext |
createContext(WrappedRequest request,
WrappedResponse response,
Application application,
Integer rootId)
|
String |
findAndEscapeThemeName(BootstrapHandler.BootstrapContext context)
Don not override. |
protected String |
getApplicationCSSClassName(Application application)
Returns the application class identifier for use in the application CSS class name in the root DIV. |
protected abstract String |
getApplicationId(BootstrapHandler.BootstrapContext context)
Creates and returns a unique ID for the DIV where the application is to be rendered. |
protected JSONObject |
getApplicationParameters(BootstrapHandler.BootstrapContext context)
|
protected abstract String |
getAppUri(BootstrapHandler.BootstrapContext context)
|
protected JSONObject |
getDefaultParameters(BootstrapHandler.BootstrapContext context)
|
protected abstract String |
getInitialUIDL(WrappedRequest request,
Root root)
Gets the initial UIDL message to send to the client. |
protected String |
getMainDivStyle(BootstrapHandler.BootstrapContext context)
|
protected String |
getNoScriptMessage()
Returns a message printed for browsers without scripting support or if browsers scripting support is disabled. |
String |
getThemeName(BootstrapHandler.BootstrapContext context)
Override if required |
String |
getThemeUri(BootstrapHandler.BootstrapContext context,
String themeName)
Get the URI for the application theme. |
String |
getWidgetsetForRoot(BootstrapHandler.BootstrapContext context)
|
boolean |
handleRequest(Application application,
WrappedRequest request,
WrappedResponse response)
Handles a non-UIDL request. |
protected void |
setBootstrapPageHeaders(BootstrapHandler.BootstrapContext context)
Method to set http request headers for the Vaadin kickstart page. |
protected void |
writeBootstrapPage(WrappedRequest request,
WrappedResponse response,
Application application,
Integer rootId)
|
protected void |
writeBootstrapPageHtmlBodyStart(BootstrapHandler.BootstrapContext context)
Method to open the body tag of the html kickstart page. |
protected void |
writeBootstrapPageHtmlHeader(BootstrapHandler.BootstrapContext context)
Method to write the contents of head element in html kickstart page. |
protected void |
writeBootstrapPageHtmlHeadStart(BootstrapHandler.BootstrapContext context)
Method to write the beginning of the html page. |
protected void |
writeBootstrapPageHtmlMainDiv(BootstrapHandler.BootstrapContext context)
Method to write the div element into which that actual Vaadin application is rendered. |
protected void |
writeBootstrapPageHtmlVaadinScripts(BootstrapHandler.BootstrapContext context)
Method to write the script part of the page which loads needed Vaadin scripts and themes. |
protected void |
writeError(WrappedResponse response,
Throwable e)
|
protected void |
writeMainScriptTagContents(BootstrapHandler.BootstrapContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BootstrapHandler()
Method Detail |
---|
public boolean handleRequest(Application application, WrappedRequest request, WrappedResponse response) throws IOException
RequestHandler
false
to indicate that no more request handlers
should be invoked for the request.
handleRequest
in interface RequestHandler
application
- The application to which the request belongsrequest
- The request to handleresponse
- The response object to which a response can be written.
IOException
protected final void writeBootstrapPage(WrappedRequest request, WrappedResponse response, Application application, Integer rootId) throws IOException, JSONException
IOException
JSONException
public BootstrapHandler.BootstrapContext createContext(WrappedRequest request, WrappedResponse response, Application application, Integer rootId)
protected String getMainDivStyle(BootstrapHandler.BootstrapContext context)
protected abstract String getApplicationId(BootstrapHandler.BootstrapContext context)
context
-
public String getWidgetsetForRoot(BootstrapHandler.BootstrapContext context)
protected void writeBootstrapPageHtmlMainDiv(BootstrapHandler.BootstrapContext context) throws IOException
Override this method if you want to add some custom html around around the div element into which the actual Vaadin application will be rendered.
context
-
IOException
protected String getNoScriptMessage()
protected String getApplicationCSSClassName(Application application)
protected void writeBootstrapPageHtmlBodyStart(BootstrapHandler.BootstrapContext context) throws IOException
This method is responsible for closing the head tag and opening the body tag.
Override this method if you want to add some custom html to the page.
IOException
protected void writeBootstrapPageHtmlVaadinScripts(BootstrapHandler.BootstrapContext context) throws IOException, JSONException
Override this method if you want to add some custom html around scripts.
context
-
IOException
JSONException
protected void writeMainScriptTagContents(BootstrapHandler.BootstrapContext context) throws JSONException, IOException
JSONException
IOException
protected JSONObject getApplicationParameters(BootstrapHandler.BootstrapContext context) throws JSONException, PaintException
JSONException
PaintException
protected JSONObject getDefaultParameters(BootstrapHandler.BootstrapContext context) throws JSONException
JSONException
protected abstract String getAppUri(BootstrapHandler.BootstrapContext context)
protected void writeBootstrapPageHtmlHeader(BootstrapHandler.BootstrapContext context) throws IOException
Override this method if you want to add some custom html to the header of the page.
IOException
protected void setBootstrapPageHeaders(BootstrapHandler.BootstrapContext context)
Override this method if you need to customize http headers of the page.
context
- protected void writeBootstrapPageHtmlHeadStart(BootstrapHandler.BootstrapContext context) throws IOException
This method is responsible for writing appropriate doc type declarations and to open html and head tags.
Override this method if you want to add some custom html to the very beginning of the page.
context
-
IOException
public String getThemeUri(BootstrapHandler.BootstrapContext context, String themeName)
context
- themeName
-
public String getThemeName(BootstrapHandler.BootstrapContext context)
context
-
public String findAndEscapeThemeName(BootstrapHandler.BootstrapContext context)
context
-
protected void writeError(WrappedResponse response, Throwable e) throws IOException
IOException
protected abstract String getInitialUIDL(WrappedRequest request, Root root) throws PaintException, JSONException
request
- the originating requestroot
- the root for which the UIDL should be generated
PaintException
- if an exception occurs while painting the components
JSONException
- if an exception occurs while formatting the output
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |