public interface Application
An instance of this interface is provided by the framework to the
configure
method of an ApplicationConfiguration
.
ApplicationConfiguration
Modifier and Type | Interface and Description |
---|---|
static class |
Application.OperationMode
Instances of this class represent a mode of operation for an RWT
application.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntryPoint(java.lang.String path,
java.lang.Class<? extends EntryPoint> entryPointType,
java.util.Map<java.lang.String,java.lang.String> properties)
Registers an entrypoint at the given servlet path.
|
void |
addEntryPoint(java.lang.String path,
EntryPointFactory entryPointFactory,
java.util.Map<java.lang.String,java.lang.String> properties)
Registers an entrypoint at the given servlet path.
|
void |
addResource(java.lang.String resourceName,
ResourceLoader resourceLoader) |
void |
addServiceHandler(java.lang.String serviceHandlerId,
ServiceHandler serviceHandler)
Adds a service handler to the application.
|
void |
addStyleSheet(java.lang.String themeId,
java.lang.String styleSheetLocation)
Adds the given stylesheet to a theme.
|
void |
addStyleSheet(java.lang.String themeId,
java.lang.String styleSheetLocation,
ResourceLoader resourceLoader)
Adds the given stylesheet to a theme.
|
void |
addThemeableWidget(java.lang.Class<? extends Widget> widget)
Register a themeable widget for this application.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set an initial attribute in the application context.
|
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
Sets the exception handler to which exceptions should be forwarded that occur while running
the event loop.
|
void |
setOperationMode(Application.OperationMode operationMode)
The operation mode in which the application will be running.
|
void |
setSettingStoreFactory(SettingStoreFactory settingStoreFactory)
Configure this application to use a custom setting store implementation.
|
void setOperationMode(Application.OperationMode operationMode)
JEE_COMPATIBILITY
.operationMode
- the operation mode to be used, must not be
null
Application.OperationMode
void addEntryPoint(java.lang.String path, java.lang.Class<? extends EntryPoint> entryPointType, java.util.Map<java.lang.String,java.lang.String> properties)
Properties can be specified to control client-specific aspects of the entrypoint such as theme,
icons, etc. The acceptable keys and values depend on the client implementation. The class
WebClient
provides constants for the default RAP client.
path
- a valid path to register the entry point atentryPointType
- the entry point class to be registered, must not be null
properties
- properties that control client-specific aspects of the application, such as
theme, icons, etc., may be null
void addEntryPoint(java.lang.String path, EntryPointFactory entryPointFactory, java.util.Map<java.lang.String,java.lang.String> properties)
Properties can be specified to control client-specific aspects of the entrypoint such as theme,
icons, etc. The acceptable keys and values depend on the client implementation. The class
WebClient
provides constants for the default RAP client.
path
- a valid path to register the entry point atentryPointFactory
- the entry point factory to be registered, must not be
null
properties
- properties that control client-specific aspects of the application, such as
theme, icons, etc., may be null
void addStyleSheet(java.lang.String themeId, java.lang.String styleSheetLocation)
ApplicationConfiguration
.themeId
- the id of the theme to register or to contribute tostyleSheetLocation
- the location of the CSS file in the format accepted by
ClassLoader.getResource(String)
ApplicationConfiguration
,
RWT.DEFAULT_THEME_ID
void addStyleSheet(java.lang.String themeId, java.lang.String styleSheetLocation, ResourceLoader resourceLoader)
ApplicationConfiguration
. The stylesheet file will be loaded using the given
resource loader.themeId
- the id of the theme to register or to contribute tostyleSheetLocation
- the location of the CSS file in the format accepted by the given
resource loaderresourceLoader
- the resource loader that is able to load the style sheet from the given
locationRWT.DEFAULT_THEME_ID
void setAttribute(java.lang.String name, java.lang.Object value)
name
- the name of the attribute, must not be null
value
- the attribute valueApplicationContext
void setSettingStoreFactory(SettingStoreFactory settingStoreFactory)
the
- setting store implementation to use, must not be null
SettingStore
void setExceptionHandler(ExceptionHandler exceptionHandler)
To give an exception handler the chance to log errors it called for all classes of exceptions.
Error
s however are re-thrown after the handler was called so that they cannot be
swallowed.
The default implementation throws the given exception, resulting in a HTTP 500 response.
the
- exception handler to use, must not be null
ExceptionHandler
void addThemeableWidget(java.lang.Class<? extends Widget> widget)
widget
- the widget to register as themeable widgetvoid addServiceHandler(java.lang.String serviceHandlerId, ServiceHandler serviceHandler)
ServiceHandler
for the
URL to access this service handler.serviceHandlerId
- the id for this servlet handler, used in the
parameterserviceHandler
- the servlet handler to registerServiceHandler
void addResource(java.lang.String resourceName, ResourceLoader resourceLoader)
Copyright (c) EclipseSource and others 2002, 2020.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0