|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractUIProvider
com.vaadin.LegacyApplication
@Deprecated public abstract class LegacyApplication
A special application designed to help migrating applications from Vaadin 6 to Vaadin 7. The legacy application supports setting a main window, adding additional browser level windows and defining the theme for the entire application.
| Constructor Summary | |
|---|---|
LegacyApplication()
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addWindow(UI.LegacyWindow uI)
Deprecated. Adds a new browser level window to this application. |
protected void |
close()
Deprecated. |
UI |
createInstance(WrappedRequest request,
java.lang.Class<? extends UI> type)
Deprecated. |
void |
doInit()
Deprecated. |
VaadinSession |
getContext()
Deprecated. |
UI |
getExistingUI(WrappedRequest request)
Deprecated. This implementation simulates the way of finding a window for a request by extracting a window name from the requested path and passes that name to getWindow(String). |
UI.LegacyWindow |
getMainWindow()
Deprecated. Gets the mainWindow of the application. |
java.lang.String |
getPageTitle(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
Deprecated. |
java.lang.String |
getTheme()
Deprecated. Gets the application's theme. |
java.lang.String |
getTheme(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
Deprecated. Finds the theme to use for a specific UI. |
java.lang.Class<? extends UI> |
getUIClass(WrappedRequest request)
Deprecated. |
java.net.URL |
getURL()
Deprecated. |
UI.LegacyWindow |
getWindow(java.lang.String name)
Deprecated. Gets a UI by name. |
java.util.Collection<UI.LegacyWindow> |
getWindows()
Deprecated. Gets the set of windows contained by the application. |
protected abstract void |
init()
Deprecated. |
boolean |
isRunning()
Deprecated. |
void |
removeWindow(UI.LegacyWindow uI)
Deprecated. Removes the specified window from the application. |
void |
setMainWindow(UI.LegacyWindow mainWindow)
Deprecated. Sets the main window of this application. |
void |
setTheme(java.lang.String theme)
Deprecated. Sets the application's theme. |
void |
terminalError(Terminal.ErrorEvent event)
Deprecated. Invoked when a terminal error occurs. |
| Methods inherited from class com.vaadin.server.AbstractUIProvider |
|---|
getAnnotationFor, getWidgetset, isPreservedOnRefresh |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LegacyApplication()
| Method Detail |
|---|
public void setMainWindow(UI.LegacyWindow mainWindow)
mainWindow - the UI to set as the default windowpublic void doInit()
protected abstract void init()
public java.lang.Class<? extends UI> getUIClass(WrappedRequest request)
getUIClass in interface UIProvider
public UI createInstance(WrappedRequest request,
java.lang.Class<? extends UI> type)
createInstance in interface UIProvidercreateInstance in class AbstractUIProvider
public java.lang.String getTheme(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
UIProvidernull is returned.
TODO Tell what the default implementation does once it does something.
getTheme in interface UIProvidergetTheme in class AbstractUIProvidernull if the default theme
should be used
public java.lang.String getPageTitle(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
getPageTitle in interface UIProvidergetPageTitle in class AbstractUIProviderpublic UI.LegacyWindow getMainWindow()
The main window is the window attached to the application URL (
getURL()) and thus which is show by default to the user.
Note that each application must have at least one main window.
public UI getExistingUI(WrappedRequest request)
getWindow(String).
Finds an existing UI for a request.
Implementations should take care to not return an UI instance that might be used in some other browser as that might cause synchronization issues when changes from one browser window are not present in the other.
If no UI provider returns an existing UI, the framework does also check
the window.name for an existing instance with
UIProvider.isPreservedOnRefresh(WrappedRequest, Class) before falling back to
bootstrapping and creating a new UI instance.
getExistingUI in interface UIProvidergetExistingUI in class AbstractUIProviderrequest - the request for which a UI is desired
null if this UI
provider doesn't have an existing UI for the request.public void setTheme(java.lang.String theme)
Note that this theme can be overridden for a specific UI with
VaadinSession#getThemeForUI(UI). Setting theme to be
null selects the default theme. For the available theme
names, see the contents of the VAADIN/themes directory.
theme - the new theme for this application.public java.lang.String getTheme()
null is
returned.
public UI.LegacyWindow getWindow(java.lang.String name)
Gets a UI by name. Returns null if the application is not
running or it does not contain a window corresponding to the name.
name - the name of the requested window
null to use the
default windowpublic void addWindow(UI.LegacyWindow uI)
#addWindow(UI, String)
uI - the UI window to add to the application#addWindow(UI, String)public void removeWindow(UI.LegacyWindow uI)
and
#getWindowName(UI).
Note that removing window from the application does not close the browser window - the window is only removed from the server-side.
uI - the UI to removepublic java.util.Collection<UI.LegacyWindow> getWindows()
Note that the returned set of windows can not be modified.
public void terminalError(Terminal.ErrorEvent event)
Terminal.ErrorListener
terminalError in interface Terminal.ErrorListenerevent - the fired event.public VaadinSession getContext()
protected void close()
public boolean isRunning()
public java.net.URL getURL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||