Class KeyboardShortcut
java.lang.Object
com.atlassian.jira.plugin.keyboardshortcut.KeyboardShortcut
- All Implemented Interfaces:
Comparable<KeyboardShortcut>
@PublicApi
public final class KeyboardShortcut
extends Object
implements Comparable<KeyboardShortcut>
Defines a keyboard shortcut. A shortcut consists of the keys required for the shortcut (could be multiples for the
same shortcut such as gh or gd), a context (some shortcuts only apply on the view issue page), the operation and a
parameter for the operation (generally a jQuery selector, but can be anything really.).
- Since:
- v4.1
-
Constructor Summary
ConstructorsConstructorDescriptionKeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden) KeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden, com.atlassian.plugin.web.Condition condition) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(KeyboardShortcut shortcut) com.atlassian.plugin.web.ConditionintgetOrder()booleanisHidden()booleanshouldDisplay(Map<String, Object> context) Returns whether the user can use the keyboard shortcut.toString()
-
Constructor Details
-
KeyboardShortcut
public KeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden) -
KeyboardShortcut
public KeyboardShortcut(String moduleKey, KeyboardShortcutManager.Context context, KeyboardShortcutManager.Operation operation, String parameter, int order, Set<List<String>> shortcuts, String descriptionI18nKey, boolean hidden, com.atlassian.plugin.web.Condition condition)
-
-
Method Details
-
getModuleKey
-
getContext
-
getOperation
-
getParameter
-
getOrder
public int getOrder() -
getShortcuts
-
getDescriptionI18nKey
-
isHidden
public boolean isHidden() -
getCondition
public com.atlassian.plugin.web.Condition getCondition() -
shouldDisplay
Returns whether the user can use the keyboard shortcut.- Parameters:
context- the context to be passed to the condition- Returns:
- whether the user can use the keyboard shortcut.
- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<KeyboardShortcut>
-
toString
-