Class WebLink


  • public class WebLink
    extends Object
    The representation of the HTML web link. Consists of URI and the optional title. If the URI is a relative URL, it shouldn't include servlet context. Title, if presents, is used when rendering as the text inside the <a> element and its title.
    Usually used for HTML rendering.
    Since:
    5.0
    • Constructor Detail

      • WebLink

        public WebLink​(@NotNull
                       String uri,
                       @Nullable
                       String title)
        Constructs a web link object with an URI and a title.
        Parameters:
        uri - URI
        title - title
      • WebLink

        public WebLink​(@NotNull
                       String path,
                       @NotNull
                       Map<String,​String> params,
                       @Nullable
                       String title)
        Constructs a web link object with a path, parameter map, and a title.
        Parameters:
        path - an URL path (without a query)
        params - query params
        title - title
    • Method Detail

      • getLink

        @NotNull
        public String getLink()
        Returns:
        the link URI
      • getTitle

        @Nullable
        public String getTitle()
        Returns:
        the title