Class UISettingsBean

Object
UISettingsBean
All Implemented Interfaces:
UISettings

public class UISettingsBean extends Object implements UISettings

This implementation of the UISettings can be used to modify the settings with StructureConfiguration.setUISettings(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project, com.almworks.jira.structure.api.settings.UISettings).

This class is not thread safe, it should be a short-term object that is filled with values, passed to StructureConfiguration and forgotten.

In addition to implementing UISettings, this class has public setter methods that allow to change the setting values.

Author:
Igor Sereda
  • Constructor Details

    • UISettingsBean

      public UISettingsBean()
      Creates an empty bean, with no settings set.
    • UISettingsBean

      public UISettingsBean(@Nullable UISettings copyFrom)
      Creates a new bean and copies all set values from another instance of UISettings.
      Parameters:
      copyFrom - another instance of UISettings, null is ignored
  • Method Details

    • getAutoSwitchStrategy

      @Nullable public AutoSwitchStrategy getAutoSwitchStrategy(@NotNull StructurePage page)
      Description copied from interface: UISettings
      Returns auto-switch strategy for the specified page. Auto-switch strategy defines which structure to load at the initial page load.
      Specified by:
      getAutoSwitchStrategy in interface UISettings
      Parameters:
      page - structure page that is being loaded, currently only StructurePage.ISSUE_VIEW, StructurePage.PROJECT_TAB, StructurePage.COMPONENT_TAB and StructurePage.VERSION_TAB make sense.
      Returns:
      auto-switch strategy for the specified page, or null if not set
    • setAutoSwitchStrategy

      @NotNull public UISettingsBean setAutoSwitchStrategy(@NotNull StructurePage page, @Nullable AutoSwitchStrategy strategy)
      Changes auto-switch strategy for the given page.
      Parameters:
      page - the page to change auto-switch for
      strategy - the new strategy, or null to un-set the option for that page
      Returns:
      this instance
      See Also:
    • getAutoCollapseStructurePanel

      public Boolean getAutoCollapseStructurePanel()
      Description copied from interface: UISettings
      Returns true if Structure panel on the issue page should automatically collapse/minimize when the displayed issue is not present in the initially selected structure.
      Specified by:
      getAutoCollapseStructurePanel in interface UISettings
      Returns:
      true if structure panel auto-collapse is enabled, or null if the settings is unknown
    • getKeepStructureWhileNavigating

      public Boolean getKeepStructureWhileNavigating()
      Description copied from interface: UISettings

      Returns true if the structure selection should be kept when the user clicks on an issue in the Structure widget.

      This allows the user to go from one issue to another, looking at the Structure panel, and the structure displayed will remain the same. If the user opens an issue page by any other means, the structure will be selected according to other settings.

      The default value for this setting (in case null is returned) is true.

      Specified by:
      getKeepStructureWhileNavigating in interface UISettings
      Returns:
      true if the structure selection should be kept when opening an issue page through the Structure widget
    • setKeepStructureWhileNavigating

      public void setKeepStructureWhileNavigating(Boolean keepStructureWhileNavigating)
    • setAutoCollapseStructurePanel

      public void setAutoCollapseStructurePanel(Boolean autoCollapseStructurePanel)
    • isAnythingSet

      public boolean isAnythingSet()
      Description copied from interface: UISettings
      Utility method that is used to check whether this instance does not have any settings set at all.
      Specified by:
      isAnythingSet in interface UISettings
      Returns:
      true if at least one setting is defined