com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcutManager |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Provides a registry of keyboard shortcuts currently available in JIRA. Keyboard shortcuts can be provided via the
KeyboardShortcut
plugin point. In order for keyboard shortcuts to remain consistent across a cluster, they
should be added or removed simultaneously across the cluster, e.g. upon startup, not at arbitrary times such as in
response to user input.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KeyboardShortcutManager.Context | Defines the context under which a keyboard shortcut is valid. | ||||||||||
KeyboardShortcutManager.Operation | Defines the different operations that can be taken using a KeyboardShortcut . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
uses
listActiveShortcutsUniquePerContext(Map under the hood
| |||||||||||
Returns an ordered list of all
KeyboardShortcut s available
using the plugin descriptor's 'order' attribute for sorting. | |||||||||||
Returns a URL to be used to include the currently registered keyboard shortcuts in a page.
| |||||||||||
Returns if the user has keyboard shortcuts enabled.
| |||||||||||
Returns an ordered list of active
KeyboardShortcut s, sorted using the plugin descriptor's
order attribute. | |||||||||||
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.
| |||||||||||
Register that the keyboard shortcuts for the context should be included by
includeShortcuts() (in
addition to the global shortcuts, which are always included). | |||||||||||
Removes a keyboard shortcut by its complete plugin module key.
|
This method is deprecated.
uses listActiveShortcutsUniquePerContext(Map
under the hood
Returns an ordered list of active KeyboardShortcut
s, sorted using the plugin descriptor's
order
attribute.
order
attribute (see the keyboard shortcut plugin module documentation).Returns an ordered list of all KeyboardShortcut
s 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.
Returns a URL to be used to include the currently registered keyboard shortcuts in a page. The URL should point
to the Keyboard Shortcut REST resource. Generally this URL will look something like:
/rest/api/1.0/shortcuts/500/f1e3b05a6e6db41e5b77fb8afd7ddde9/shortcuts.js
Returns if the user has keyboard shortcuts enabled. If the user is not logged in this will default to true
Returns an ordered list of active KeyboardShortcut
s, sorted using the plugin descriptor's
order
attribute.
KeyboardShortcutManager.Context
that
uses the same key combination and has a greater value in its order
attribute (see the
keyboard
shortcut plugin module documentation). Thus this list can contain multiple shortcuts with the same
key combination, which all belong to a different context.
userContext | the context to be used when evaluating, whether the user is allowed to use the shortcut; not
null |
---|
KeyboardShortcutManager.Context
; not null
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.
pluginModuleKey | the complete plugin module key for this keyboard shortcut |
---|---|
shortcut | the shortcut to register |
Register that the keyboard shortcuts for the context should be included by includeShortcuts()
(in
addition to the global
shortcuts, which are always included).
context | the context whose keyboard shorcuts should be included (in addition to global ).
|
---|
Removes a keyboard shortcut by its complete plugin module key.
pluginModuleKey | the key to remove |
---|