|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.plugin.keyboardshortcut.CachingKeyboardShortcutManager
public class CachingKeyboardShortcutManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcutManager |
|---|
KeyboardShortcutManager.Context, KeyboardShortcutManager.Operation |
| Constructor Summary | |
|---|---|
CachingKeyboardShortcutManager(BuildUtilsInfo buildUtilsInfo,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration,
JiraAuthenticationContext authenticationContext,
UserPreferencesManager userPreferencesManager)
|
|
| Method Summary | |
|---|---|
List<KeyboardShortcut> |
getAllShortcuts()
Returns an ordered list of all KeyboardShortcuts available
using the plugin descriptor's 'order' attribute for sorting. |
String |
includeShortcuts()
Returns a URL to be used to include the currently registered keyboard shortcuts in a page. |
boolean |
isKeyboardShortcutsEnabled()
Returns if the user has keyboard shortcuts enabled. |
void |
onClearCache(ClearCacheEvent event)
|
void |
registerShortcut(String pluginModuleKey,
KeyboardShortcut shortcut)
Given a complete plugin module key, this method registers a keyboard shortcut with the manager, which will make it available in the UI to end-users. |
void |
requireShortcutsForContext(KeyboardShortcutManager.Context context)
Register that the keyboard shortcuts for the context should be included by KeyboardShortcutManager.includeShortcuts() (in
addition to the global shortcuts, which are always included). |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
void |
unregisterShortcut(String pluginModuleKey)
Removes a keyboard shortcut by its complete plugin module key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingKeyboardShortcutManager(BuildUtilsInfo buildUtilsInfo,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration,
JiraAuthenticationContext authenticationContext,
UserPreferencesManager userPreferencesManager)
| Method Detail |
|---|
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public void registerShortcut(String pluginModuleKey,
KeyboardShortcut shortcut)
KeyboardShortcutManager
registerShortcut in interface KeyboardShortcutManagerpluginModuleKey - the complete plugin module key for this keyboard shortcutshortcut - the shortcut to registerpublic void unregisterShortcut(String pluginModuleKey)
KeyboardShortcutManager
unregisterShortcut in interface KeyboardShortcutManagerpluginModuleKey - the key to removepublic List<KeyboardShortcut> getAllShortcuts()
KeyboardShortcutManagerKeyboardShortcuts available
using the plugin descriptor's 'order' attribute for sorting. Implementations should take care to implement this
method as quickly as possible since it will be called very often.
getAllShortcuts in interface KeyboardShortcutManagerpublic void requireShortcutsForContext(KeyboardShortcutManager.Context context)
KeyboardShortcutManagerKeyboardShortcutManager.includeShortcuts() (in
addition to the global shortcuts, which are always included).
requireShortcutsForContext in interface KeyboardShortcutManagercontext - the context whose keyboard shorcuts should be included (in addition to global).public String includeShortcuts()
KeyboardShortcutManager/rest/api/1.0/shortcuts/500/f1e3b05a6e6db41e5b77fb8afd7ddde9/shortcuts.js
It has been suggested that webresources (with say the systemcounter) would be a good fit for this, however the
problem is that the systemcounter would have to be updated everytime a plugin is enabled/disabled (so everytime
JIRA is started up), which would have some adverse side effects:
includeShortcuts in interface KeyboardShortcutManagerKeyboardShortcutManager.requireShortcutsForContext(com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcutManager.Context)public boolean isKeyboardShortcutsEnabled()
KeyboardShortcutManager
isKeyboardShortcutsEnabled in interface KeyboardShortcutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||