Class DefaultShortcutLinksManager
- java.lang.Object
-
- com.atlassian.confluence.renderer.DefaultShortcutLinksManager
-
- All Implemented Interfaces:
ShortcutLinksManager
public class DefaultShortcutLinksManager extends Object implements ShortcutLinksManager
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_PROPERTIES
-
Constructor Summary
Constructors Constructor Description DefaultShortcutLinksManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addShortcutLink(String key, ShortcutLinkConfig shortcutLinkConfig)
Add a shortcut.ShortcutLinkConfig
getShortcutLinkConfig(String key)
Map<String,ShortcutLinkConfig>
getShortcutLinks()
boolean
hasShortcutLink(String key)
void
removeShortcutLink(String key)
String
resolveDefaultLinkAlias(String key, String parameter)
Resolves default alias.String
resolveShortcutUrl(String key, String parameter)
Resolves shortcut url.void
setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
void
updateShortcutLinks(Map shortcutLinks)
-
-
-
Field Detail
-
DEFAULT_PROPERTIES
public static final String DEFAULT_PROPERTIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getShortcutLinks
public Map<String,ShortcutLinkConfig> getShortcutLinks()
- Specified by:
getShortcutLinks
in interfaceShortcutLinksManager
-
addShortcutLink
public void addShortcutLink(String key, ShortcutLinkConfig shortcutLinkConfig)
Add a shortcut. All shortcut keys will be stored as lowercase.- Specified by:
addShortcutLink
in interfaceShortcutLinksManager
-
removeShortcutLink
public void removeShortcutLink(String key)
- Specified by:
removeShortcutLink
in interfaceShortcutLinksManager
-
updateShortcutLinks
public void updateShortcutLinks(Map shortcutLinks)
- Specified by:
updateShortcutLinks
in interfaceShortcutLinksManager
-
setBandanaManager
public void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
-
hasShortcutLink
public boolean hasShortcutLink(String key)
- Specified by:
hasShortcutLink
in interfaceShortcutLinksManager
-
getShortcutLinkConfig
public ShortcutLinkConfig getShortcutLinkConfig(String key)
- Specified by:
getShortcutLinkConfig
in interfaceShortcutLinksManager
-
resolveShortcutUrl
public String resolveShortcutUrl(String key, String parameter)
Description copied from interface:ShortcutLinksManager
Resolves shortcut url.- Specified by:
resolveShortcutUrl
in interfaceShortcutLinksManager
- Parameters:
key
- the shortcut keyparameter
- parameter to substitute into shortcut- Returns:
- the resolved url.
-
resolveDefaultLinkAlias
public String resolveDefaultLinkAlias(String key, String parameter)
Description copied from interface:ShortcutLinksManager
Resolves default alias.- Specified by:
resolveDefaultLinkAlias
in interfaceShortcutLinksManager
- Parameters:
key
- the shortcut keyparameter
- parameter to substitute into alias (if it has a variable)- Returns:
- the resolved alias or empty string if no default alias is defined for the specified shortcut key
-
-