Eclipse Rich Ajax Platform

## org.eclipse.rwt.application
Interface Application

    public interface Application

This interface represents an RWT application before it is started. It's used to configure the various aspects that form an application such as entrypoints, URL mapping, styling, etc.

An instance of this interface is provided by the framework to the `configure` method of an `ApplicationConfiguration`.

Since:
  1.5
See Also:
  `ApplicationConfiguration`

Nested Class Summary
`static class` `Application.OperationMode` Instances of this class represent a mode of operation for an RWT application.

Method Summary
`void` `addEntryPoint(java.lang.String path, java.lang.Class<? extends IEntryPoint> entryPointType, java.util.Map<java.lang.String,java.lang.String> properties)` Registers an entry point at the given servlet path.
`void` `addEntryPoint(java.lang.String path, IEntryPointFactory entryPointFactory, java.util.Map<java.lang.String,java.lang.String> properties)` Registers an entry point factory at the given servlet path.
`void` `addPhaseListener(PhaseListener phaseListener)` Add a phase listener to the application to perform custom tasks during the processing of a request.
`void` `addResource(IResource resource)` Add a resource to the application, e.g.
`void` `addServiceHandler(java.lang.String serviceHandlerId, IServiceHandler serviceHandler)` Adds a service handler to the application.
`void` `addStyleSheet(java.lang.String themeId, java.lang.String styleSheetLocation)` Adds a stylesheet that contains a theme or a theme contribution to the application.
`void` `addStyleSheet(java.lang.String themeId, java.lang.String styleSheetLocation, ResourceLoader resourceLoader)` Adds a stylesheet that contains a theme or a theme contribution to the application.
`void` `addThemableWidget(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 store.
`void` `setOperationMode(Application.OperationMode operationMode)` The operation mode in which the application will be running.
`void` `setSettingStoreFactory(ISettingStoreFactory settingStoreFactory)` Configure this application to use a custom setting store implementation.

Method Detail

### setOperationMode

    void setOperationMode(Application.OperationMode operationMode)

  The operation mode in which the application will be running. The default is `JEE_COMPATIBILITY`.

  Parameters:
    `operationMode` - the operation mode to be used, must not be `null`
  See Also:
    `Application.OperationMode`

### addEntryPoint

    void addEntryPoint(java.lang.String path,
                       java.lang.Class<? extends IEntryPoint> entryPointType,
                       java.util.Map<java.lang.String,java.lang.String> properties)

  Registers an entry point at the given servlet path. A servlet path must begin with slash ('/') and must not end with a slash ('/'). The root path ("/") is currently not supported, as well as nested paths (e.g. "/path/subpath"). 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.

  Parameters:
    `path` - a valid path to register the entry point at
    `entryPointType` - 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`

### addEntryPoint

    void addEntryPoint(java.lang.String path,
                       IEntryPointFactory entryPointFactory,
                       java.util.Map<java.lang.String,java.lang.String> properties)

  Registers an entry point factory at the given servlet path. A servlet path must begin with slash ('/') and must not end with slash ('/'). The root path ("/") is currently not supported, as well as nested paths (e.g. "/path/subpath"). 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.

  Parameters:
    `path` - a valid path to register the entry point at
    `entryPointFactory` - 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`

### addStyleSheet

    void addStyleSheet(java.lang.String themeId,
                       java.lang.String styleSheetLocation)

  Adds a stylesheet that contains a theme or a theme contribution to the application. If a theme with the given theme id exists already, then the stylesheet is handled as a contribution to this theme, otherwise it is registered as a new theme with the given id. The stylesheet file will be loaded with the classloader of the `ApplicationConfiguration`.

  Parameters:
    `themeId` - the id of the theme to register or to contribute to
    `styleSheetLocation` - the location of the CSS file in the format accepted by `ClassLoader.getResource(String)`
  See Also:
    `ApplicationConfiguration`, `RWT.DEFAULT_THEME_ID`

### addStyleSheet

    void addStyleSheet(java.lang.String themeId,
                       java.lang.String styleSheetLocation,
                       ResourceLoader resourceLoader)

  Adds a stylesheet that contains a theme or a theme contribution to the application. If a theme with the given theme id exists already, then the stylesheet is handled as a contribution to this theme, otherwise it is registered as a new theme with the given id. The stylesheet file will be loaded using the given resource loader.

  Parameters:
    `themeId` - the id of the theme to register or to contribute to
    `styleSheetLocation` - the location of the CSS file in the format accepted by the given resource loader
    `resourceLoader` - the resource loader that is able to load the style sheet from the given location
  See Also:
    `RWT.DEFAULT_THEME_ID`

### addPhaseListener

    void addPhaseListener(PhaseListener phaseListener)

  Add a phase listener to the application to perform custom tasks during the processing of a request.

  Parameters:
    `phaseListener` - the phase listener to add
  See Also:
    `PhaseListener`

### setAttribute

    void setAttribute(java.lang.String name,
                      java.lang.Object value)

  Set an initial attribute in the application store.

  Parameters:
    `name` - the name of the attribute, must not be `null`
    `value` - the attribute value
  See Also:
    `IApplicationStore`

### setSettingStoreFactory

    void setSettingStoreFactory(ISettingStoreFactory settingStoreFactory)

  Configure this application to use a custom setting store implementation.

  Parameters:
    `the` - setting store implementation to use
  See Also:
    `ISettingStore`

### addThemableWidget

    void addThemableWidget(java.lang.Class<? extends Widget> widget)

  Register a themeable widget for this application. A themeable widget is a custom widget that supports theming. To do so, the widget provides a couple of classes and files, such as a theme adapter, that will be found by a naming convention. It's sufficient to register the widget itself. For details on custom widgets, please refer to the documentation.

  Parameters:
    `widget` - the widget to register as themeable widget

### addServiceHandler

    void addServiceHandler(java.lang.String serviceHandlerId,
                           IServiceHandler serviceHandler)

  Adds a service handler to the application. A service handler is used to handle requests with a certain parameter inside the application. You can think of it like a lightweight servlet that has access to the user's session. Please see the documentation of `IServiceHandler` for the URL to access this service handler.

  Parameters:
    `serviceHandlerId` - the id for this servlet handler, used in the parameter
    `serviceHandler` - the servlet handler to register
  See Also:
    `IServiceHandler`

### addResource

    void addResource(IResource resource)

  Add a resource to the application, e.g. a JavaScript file or an image. For every resource to add, an implementation of the IResource interface must be provided.

  Parameters:
    `resource` - the resource to add
  See Also:
    `IResource`

Eclipse Rich Ajax Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.