Interface ConfigurableBrowserArea

All Superinterfaces:
CockpitEventAcceptor, CockpitEventProducer, FocusablePerspectiveArea, UIBrowserArea, UICockpitArea, UIComponent
All Known Implementing Classes:
DefaultConfigurableBrowserArea

public interface ConfigurableBrowserArea extends UIBrowserArea
Browser area which supports creation of multiple Cockpit browser types, configured using Spring.
  • Method Details

    • isBrowserSupported

      boolean isBrowserSupported(String browserId)
      Returns whether this browser area supports creation of browsers with the specified ID.

      Supported browsers are those which have been configured by a call to setSupportedBrowserIds(List)

      Parameters:
      browserId - browser ID
      Returns:
      true if browser with the specified id can be created, false otherwise
      See Also:
    • createBrowser

      <T extends BrowserModel> T createBrowser(String browserId, Class<T> expectedClass)
      Creates a browser with the specified ID if it is supported.

      Note: isBrowserSupported(String) should be called before calling this method in order to assure that a browser with the specified code can be created.

      Type Parameters:
      T - type of browser model
      Parameters:
      browserId - browser Spring bean ID
      expectedClass - expected browser type
      Returns:
      browser model of type T
      See Also:
    • setSupportedBrowserIds

      void setSupportedBrowserIds(List<String> browserIds)
      Sets the browsers supported by this browser area.
      Parameters:
      browserIds - list containing Spring bean IDs of all supported browsers
    • getSupportedBrowserIds

      List<String> getSupportedBrowserIds()
      Returns all browser IDs supported by this browser area.
      Returns:
      list containing Spring bean IDs of all supported browsers
    • setDefaultBrowserId

      void setDefaultBrowserId(String id)
      Sets the Spring bean ID of this area's default browser.

      Note: The corresponding Spring bean should be declared in the "prototype" scope.

      Parameters:
      id - bean ID of the default browser
    • getDefaultBrowserId

      String getDefaultBrowserId()
      Returns the Spring bean ID of this area's default browser.
      Returns:
      bean ID of the default browser
    • getBrowserModel

      BrowserModel getBrowserModel(String browserCode)
      Returns the browser with the code browserCode.
      Parameters:
      browserCode - code of the browser
      Returns:
      browser with the specified code or null if no browser is found