Class HelpLink

java.lang.Object
org.ametys.plugins.core.ui.help.HelpLink

public class HelpLink extends Object
Represent a link used for help (point/id and list of urls by lang)
  • Field Details

  • Constructor Details

    • HelpLink

      public HelpLink(String family, String id, Map<String,String> urls)
      Create a HelpLink for an extension point/id and a list of urls
      Parameters:
      family - the family for this link (for example an extension point)
      id - the id in the family (must be unique in the family)
      urls - a map with language/url for the help pages
  • Method Details

    • getUniqueId

      public static String getUniqueId(String family, String id)
      Generate an unique ID to access this link accross a map
      Parameters:
      family - the family for this link (for example an extension point)
      id - the id in the family (must be unique in the family)
      Returns:
      an Unique ID
    • getUniqueId

      public String getUniqueId()
      Get an unique ID across the application
      Returns:
      an unique ID
    • getUrls

      public Map<String,String> getUrls()
      Get all urls in a map of language/url
      Returns:
      the list of urls available (can be null)
    • getUrl

      public String getUrl(String language)
      Get the url for a language, or a default one if the requested language is null
      Parameters:
      language - language requested (null if you want any language available, starting with the default one)
      Returns:
      a help url, or null if nothing is found or map empty
    • getLanguages

      public Set<String> getLanguages()
      Get a set of available languages
      Returns:
      a set of available languages (can not be null)
    • getFamily

      public String getFamily()
      Get the the family for this link (for example an extension point)
      Returns:
      the extension point
    • getId

      public String getId()
      Get the extension id in the extension point, for this link
      Returns:
      the id in the family (unique in the family)