Package com.atlassian.jira.user
Class ExternalLinkInNewWindowImpl
java.lang.Object
com.atlassian.jira.user.ExternalLinkInNewWindowImpl
- All Implemented Interfaces:
ExternalLinkInNewWindow
-
Constructor Summary
ConstructorsConstructorDescriptionExternalLinkInNewWindowImpl
(UserPreferencesManager userPreferencesManager, FeatureManager featureManager, BaseUrl baseUrl) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isEnabled
(ApplicationUser user) Tells whether the opening external links in new tabs/windows is enabled for the given user.boolean
shouldOpenInNewWindow
(ApplicationUser user, String url) Tells whether a link with given URL should open in a new tab/window when clicked by the given user.
-
Constructor Details
-
ExternalLinkInNewWindowImpl
public ExternalLinkInNewWindowImpl(UserPreferencesManager userPreferencesManager, FeatureManager featureManager, BaseUrl baseUrl)
-
-
Method Details
-
isEnabled
Description copied from interface:ExternalLinkInNewWindow
Tells whether the opening external links in new tabs/windows is enabled for the given user. When the feature is disabled globally, returns false for all users- Specified by:
isEnabled
in interfaceExternalLinkInNewWindow
- Parameters:
user
- user to check the setting for- Returns:
- true if the setting is enabled
-
shouldOpenInNewWindow
Description copied from interface:ExternalLinkInNewWindow
Tells whether a link with given URL should open in a new tab/window when clicked by the given user. Takes user preference into consideration.- Specified by:
shouldOpenInNewWindow
in interfaceExternalLinkInNewWindow
- Parameters:
user
- user visiting the linkurl
- address of the link- Returns:
- true if the link should be opened in a separate tab/window
-