Package org.ametys.plugins.core.ui.help
Class HelpLink
- java.lang.Object
-
- org.ametys.plugins.core.ui.help.HelpLink
-
-
Field Summary
Fields Modifier and Type Field Description private String
_family
private String
_id
private Map<String,String>
_urls
static String
DEFAULT_LANGUAGE
default language for the links if the requested one is not foundstatic String
SEPARATOR
Separator to create the unique id in getUniqueId
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFamily()
Get the the family for this link (for example an extension point)String
getId()
Get the extension id in the extension point, for this linkSet<String>
getLanguages()
Get a set of available languagesString
getUniqueId()
Get an unique ID across the applicationstatic String
getUniqueId(String family, String id)
Generate an unique ID to access this link accross a mapString
getUrl(String language)
Get the url for a language, or a default one if the requested language is nullMap<String,String>
getUrls()
Get all urls in a map of language/url
-
-
-
Field Detail
-
DEFAULT_LANGUAGE
public static final String DEFAULT_LANGUAGE
default language for the links if the requested one is not found- See Also:
- Constant Field Values
-
SEPARATOR
public static final String SEPARATOR
Separator to create the unique id in getUniqueId- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
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
-
-