Enum Class AutoSwitchStrategy

Object
Enum<AutoSwitchStrategy>
AutoSwitchStrategy
All Implemented Interfaces:
Serializable, Comparable<AutoSwitchStrategy>, Constable

public enum AutoSwitchStrategy extends Enum<AutoSwitchStrategy>
AutoSwitchStrategy enum defines how the initial structure is selected when the user opens issue page or project page.
Author:
Igor Sereda
See Also:
  • Enum Constant Details

    • AUTOSWITCH_OFF

      public static final AutoSwitchStrategy 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

      public static final AutoSwitchStrategy 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

      public static final AutoSwitchStrategy DEFAULT_STRUCTURE
      When auto-switch is set to DEFAULT_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.
      See Also:
  • Field Details

    • PLUGIN_DEFAULT_AUTOSWITCH_STRATEGY

      public static final AutoSwitchStrategy PLUGIN_DEFAULT_AUTOSWITCH_STRATEGY
      Defines system default auto-switch strategy for an issue page.
  • Method Details

    • values

      public static AutoSwitchStrategy[] 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

      public static AutoSwitchStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getStringCode

      public String getStringCode()
      Returns:
      a string that identifies this strategy (for serialization)
    • fromStringCode

      @Nullable public static AutoSwitchStrategy fromStringCode(String code)
      Returns:
      an auto-switch strategy with the matching code, or null if none exists (for serialization)