Interface SharedContext

    • Method Detail

      • baselineRevision

        java.lang.String baselineRevision()
        Returns baseline revision or null when not running in baseline context. Never return empty string or string containing only white space characters.
      • currentUserId

        java.lang.String currentUserId()
        May return null when the code is running on the server without any client, but sometimes the system user 'polarion' is used in these cases.
      • createPortalLink

        PortalLinkBuilder createPortalLink()
        Returns builder for portal links respecting this UI context, for example the baselineRevision. Never returns null.
      • createHtmlLink

        HtmlLink createHtmlLink​(@Nullable
                                java.lang.String url)
        Returns relative link for the given parameter. To be used for links related to current Polarion server.
        Example: /polarion/help/index.jsp
        The url parameter must be encoded. Use escaping tools to encode the parts of your url from Velocity: $esc.url(part)
        Returns null if the given url is null or empty.
      • browserType

        BrowserType browserType()
        This method works also on server when processing request from client. BrowserType.Other is returned when the code is running on server without any browser client.