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.boolean
Utility method that is used to check whether this instance does not have any settings set at all.void
setAutoCollapseStructurePanel
(Boolean autoCollapseStructurePanel) setAutoSwitchStrategy
(StructurePage page, AutoSwitchStrategy strategy) Changes auto-switch strategy for the given page.void
setKeepStructureWhileNavigating
(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
,null
is ignored
-
-
Method Details
-
getAutoSwitchStrategy
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 interfaceUISettings
- Parameters:
page
- structure page that is being loaded, currently onlyStructurePage.ISSUE_VIEW
,StructurePage.PROJECT_TAB
,StructurePage.COMPONENT_TAB
andStructurePage.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 forstrategy
- the new strategy, ornull
to un-set the option for that page- Returns:
- this instance
- See Also:
-
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 interfaceUISettings
- Returns:
- true if structure panel auto-collapse is enabled, or
null
if the settings is unknown
-
setAutoCollapseStructurePanel
-
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 interfaceUISettings
- Returns:
- true if at least one setting is defined
-