Class UISettingsBean
Object
UISettingsBean
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionCreates an empty bean, with no settings set.UISettingsBean(UISettings copyFrom) Creates a new bean and copies all set values from another instance of UISettings. -
Method Summary
Modifier and TypeMethodDescriptionReturns true if Structure panel on the issue page should automatically collapse/minimize when the displayed issue is not present in the initially selected structure.Returns auto-switch strategy for the specified page.Returns true if the structure selection should be kept when the user clicks on an issue in the Structure widget.booleanUtility method that is used to check whether this instance does not have any settings set at all.voidsetAutoCollapseStructurePanel(Boolean autoCollapseStructurePanel) setAutoSwitchStrategy(StructurePage page, AutoSwitchStrategy strategy) Changes auto-switch strategy for the given page.voidsetKeepStructureWhileNavigating(Boolean keepStructureWhileNavigating)
-
Constructor Details
-
UISettingsBean
public UISettingsBean()Creates an empty bean, with no settings set. -
UISettingsBean
Creates a new bean and copies all set values from another instance of UISettings.- Parameters:
copyFrom- another instance ofUISettings,nullis ignored
-
-
Method Details
-
getAutoSwitchStrategy
Description copied from interface:UISettingsReturns auto-switch strategy for the specified page. Auto-switch strategy defines which structure to load at the initial page load.- Specified by:
getAutoSwitchStrategyin interfaceUISettings- Parameters:
page- structure page that is being loaded, currently onlyStructurePage.ISSUE_VIEW,StructurePage.PROJECT_TAB,StructurePage.COMPONENT_TABandStructurePage.VERSION_TABmake sense.- Returns:
- auto-switch strategy for the specified page, or
nullif 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 forstrategy- the new strategy, ornullto un-set the option for that page- Returns:
- this instance
- See Also:
-
getAutoCollapseStructurePanel
Description copied from interface:UISettingsReturns 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:
getAutoCollapseStructurePanelin interfaceUISettings- Returns:
- true if structure panel auto-collapse is enabled, or
nullif the settings is unknown
-
setAutoCollapseStructurePanel
-
isAnythingSet
public boolean isAnythingSet()Description copied from interface:UISettingsUtility method that is used to check whether this instance does not have any settings set at all.- Specified by:
isAnythingSetin interfaceUISettings- Returns:
- true if at least one setting is defined
-