Class Browsers


  • public class Browsers
    extends Object
    Provides facilities for creating browsers to display OSLC remote resources.
    Since:
    1.1.0
    • Method Detail

      • createBrowser

        public static Browser createBrowser​(Composite parent)
        Creates a browser to embed in a Shell. The owning shell will listen for events raised by the browser, to resize, show or hide the shell as necessary.
        Parameters:
        parent - the composite in which a browser is to display.
        Returns:
        the created browser.
      • addResponseListener

        public static void addResponseListener​(Browser browser,
                                               BrowserResponseListener listener)
        Registers a listener notified of OSLC responses raised by the delegated OSLC user interface displayed within a browser.
        Parameters:
        browser - the browser in which an OSLC delegated user interface is displayed.
        listener - the listener notified of OSLC responses.
      • setLocation

        public static void setLocation​(Browser browser,
                                       Dialog dialog)
        Updates the URL of a browser and the size of its owning shell, based on the specified dialog.
        Parameters:
        browser - the browser in which the OSLC dialog URL is to display.
        dialog - the dialog which defines a URL of a web page to display and the preferred size of the browser.
      • setJazzCredentials

        public static void setJazzCredentials​(Browser browser,
                                              org.apache.http.auth.Credentials credentials)
        Provides credentials that the browser can use when authentication is requested by the Jazz server.

        When a login page is displayed, the browser will automatically fill the user ID and password and submit the login form. If credentials are not validated by the server, the login form is displayed again in the browser and the user has the opportunity to enter manually the field values.

        Parameters:
        browser - the browser in which a Jazz OSLC resource is to display.
        credentials - the user identity to connect to the Jazz OSLC resource.
      • createOAuthHandler

        public static OAuthHandler createOAuthHandler​(Supplier<Display> displaySupplier)
        Instantiates an OAuthHandler that displays a login form provided by the friend application for user to connect after consumer validation
        Parameters:
        displaySupplier - provide the display on which the browser has to be opened
        Returns:
        a handler to display a login form provided by the friend application
        Since:
        3.3.0