Class LastVisitedItemUrlProvider
java.lang.Object
com.atlassian.jira.projects.sidebar.lastvisited.LastVisitedItemUrlProvider
Responsible for providing the URL of navigation items in the sidebar.
In the normal case of remembering the last visited item in the sidebar,
we retrieve the NavigationItem corresponding to the remembered web-item
using the LastVisitedNavigationItemService, which we can then get the URL
from and navigate to. However, in the case of Agile web-items that are
remembered, our approach doesn't remember any filters that someone has
used in Backlog (for example). Therefore in this case, we load the URL
from the default Agile page, which means that Agile will be responsible
for remembering the last item and its associated quick filters.
-
Constructor Summary
ConstructorsConstructorDescriptionLastVisitedItemUrlProvider(SidebarNavigationService sidebarNavigationService) -
Method Summary
Modifier and TypeMethodDescriptiongetLastVisitedItemUrl(Optional<NavigationItem> lastVisitedNavItemOptional, Project project) Get the URL of the default Agile page if the item is an Agile item, otherwise get the URL of the given navigation item.
-
Constructor Details
-
Method Details
-
getLastVisitedItemUrl
public Optional<String> getLastVisitedItemUrl(Optional<NavigationItem> lastVisitedNavItemOptional, Project project) Get the URL of the default Agile page if the item is an Agile item, otherwise get the URL of the given navigation item.- Parameters:
lastVisitedNavItemOptional- An Optional over NavigationItem that contains the last visited itemproject- The project to get the last visited item URL for- Returns:
- An Optional over String containing the URL
-