Enum Class AutoSwitchStrategy
- All Implemented Interfaces:
Serializable,Comparable<AutoSwitchStrategy>,Constable
AutoSwitchStrategy enum defines how the initial structure is selected when the user
opens issue page or project page.- Author:
- Igor Sereda
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen auto-switch is turned off, the "current" structure is opened on the page.When auto-switch is set toDEFAULT_STRUCTURE, the default structure is always displayed when the issue or project page is opened.When auto-switch is set toSTRUCTURE_WITH_ISSUE, the structure displayed on the issue page will be the structure that contains that issue. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AutoSwitchStrategyDefines system default auto-switch strategy for an issue page. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutoSwitchStrategyfromStringCode(String code) static AutoSwitchStrategyReturns the enum constant of this class with the specified name.static AutoSwitchStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTOSWITCH_OFF
When auto-switch is turned off, the "current" structure is opened on the page. Current structure is usually the last structure that the user has viewed. -
STRUCTURE_WITH_ISSUE
When auto-switch is set to
STRUCTURE_WITH_ISSUE, the structure displayed on the issue page will be the structure that contains that issue.If the issue belongs to several structures (viewable by the user), or if it does not belong to any, the behavior is not contractually defined. The implementation may make "best guess", based on the "current" structure (the last structure the user has viewed) and the default structure for the project.
This value does not make sense for the pages other than
StructurePage.ISSUE_VIEW. -
DEFAULT_STRUCTURE
When auto-switch is set toDEFAULT_STRUCTURE, the default structure is always displayed when the issue or project page is opened. The default structure for the viewed project (or the project of the viewed issue) will be used.
-
-
Field Details
-
PLUGIN_DEFAULT_AUTOSWITCH_STRATEGY
Defines system default auto-switch strategy for an issue page.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getStringCode
- Returns:
- a string that identifies this strategy (for serialization)
-
fromStringCode
- Returns:
- an auto-switch strategy with the matching code, or
nullif none exists (for serialization)
-