Class DefaultSimpleLinkManager
java.lang.Object
com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager
- All Implemented Interfaces:
SimpleLinkManager
- Direct Known Subclasses:
ThreadLocalCachingSimpleLinkManager
Deprecated.
Default implementation of the SimpleLinkManager This actually uses combines SimpleLinkFactory lists with
WebItemModuleDescriptor links and WebSectionModuleDescriptor
sections, respecting weights.- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSimpleLinkManager(com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager, SimpleLinkFactoryModuleDescriptors simpleLinkFactoryModuleDescriptors, JiraAuthenticationContext authenticationContext, JiraProperties jiraProperties, com.atlassian.webresource.api.WebResourceUrlProvider webResourceUrlProvider, VelocityRequestContextFactory velocityRequestContextFactory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptiongetLinksForSection(String section, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Gets a list ofSimpleLinkfor the given section.getLinksForSection(String section, ApplicationUser remoteUser, JiraHelper jiraHelper, boolean addIconCachingPrefix) Deprecated.Gets a list ofSimpleLinkfor the given section.getLinksForSectionIgnoreConditions(String section, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Gets a list ofSimpleLinkfor the given section, without filtering links using the conditions specified for the links.getNotEmptySectionsForLocation(String location, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Gets a list ofSimpleLinkSectionfor the given location, that have either web-items or other web-sections within them.getSectionForURL(String topLevelSection, String URL, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Recursively search through our sections within sections within sections within ...getSectionsForLocation(String location, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Gets a list ofSimpleLinkSectionfor the given location.booleanshouldLocationBeLazy(String location, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.This determines whether a location should be loaded lazily if possible.booleanshouldSectionBeLazy(String section) Deprecated.This determines whether a section should be loaded lazily if possible.
-
Constructor Details
-
DefaultSimpleLinkManager
public DefaultSimpleLinkManager(com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager, SimpleLinkFactoryModuleDescriptors simpleLinkFactoryModuleDescriptors, JiraAuthenticationContext authenticationContext, JiraProperties jiraProperties, com.atlassian.webresource.api.WebResourceUrlProvider webResourceUrlProvider, VelocityRequestContextFactory velocityRequestContextFactory) Deprecated.
-
-
Method Details
-
shouldLocationBeLazy
public boolean shouldLocationBeLazy(@Nonnull String location, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper) Deprecated.This determines whether a location should be loaded lazily if possible. This loops through all sections for the location and then retrieves allSimpleLinkFactoryModuleDescriptorfor those sections and sees whether any of the factories say they should be lazy. If any say true, return true.- Specified by:
shouldLocationBeLazyin interfaceSimpleLinkManager- Parameters:
location- The location to check forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- true if any of the underlying factories for this location say they should be lazy, false otherwise
-
shouldSectionBeLazy
Deprecated.This determines whether a section should be loaded lazily if possible. DO NOT USE: This method only checks simple link factories and not the web-section. Nothing uses it now and it should not be used in future!- Specified by:
shouldSectionBeLazyin interfaceSimpleLinkManager- Parameters:
section- The section to check for- Returns:
- true if any of the underlying factories for this section say they should be lazy, false otherwise
-
getLinksForSection
@Nonnull public List<SimpleLink> getLinksForSection(@Nonnull String section, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper) Deprecated.Description copied from interface:SimpleLinkManagerGets a list ofSimpleLinkfor the given section.- Specified by:
getLinksForSectionin interfaceSimpleLinkManager- Parameters:
section- The section to generate the list forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- The list of links for the given section
-
getLinksForSection
@Nonnull public List<SimpleLink> getLinksForSection(@Nonnull String section, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper, boolean addIconCachingPrefix) Deprecated.Description copied from interface:SimpleLinkManagerGets a list ofSimpleLinkfor the given section. Additionally it adds caching prefix to icon url, if addIconCachinPrefix is true- Specified by:
getLinksForSectionin interfaceSimpleLinkManager- Parameters:
section- The section to generate the list forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generatedaddIconCachingPrefix- Diecides if relative icon URL will be automatically prefixed- Returns:
- The list of links for the given section
-
getLinksForSectionIgnoreConditions
@Nonnull public List<SimpleLink> getLinksForSectionIgnoreConditions(@Nonnull String section, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper) Deprecated.Description copied from interface:SimpleLinkManagerGets a list ofSimpleLinkfor the given section, without filtering links using the conditions specified for the links. This will effectively return a list of links without running any security checks.- Specified by:
getLinksForSectionIgnoreConditionsin interfaceSimpleLinkManager- Parameters:
section- The section to generate the list forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- The list of links for the given section
-
getSectionsForLocation
@Nonnull public List<SimpleLinkSection> getSectionsForLocation(@Nonnull String location, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper) Deprecated.Description copied from interface:SimpleLinkManagerGets a list ofSimpleLinkSectionfor the given location.- Specified by:
getSectionsForLocationin interfaceSimpleLinkManager- Parameters:
location- The location to generate the list forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- The list of sections for the give location
-
getNotEmptySectionsForLocation
@Nonnull public List<SimpleLinkSection> getNotEmptySectionsForLocation(@Nonnull String location, ApplicationUser remoteUser, @Nonnull JiraHelper jiraHelper) Deprecated.Description copied from interface:SimpleLinkManagerGets a list ofSimpleLinkSectionfor the given location, that have either web-items or other web-sections within them.- Specified by:
getNotEmptySectionsForLocationin interfaceSimpleLinkManager- Parameters:
location- The location to generate the list forremoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- The list of sections for the give location
-
getSectionForURL
public SimpleLinkSection getSectionForURL(@Nonnull String topLevelSection, @Nonnull String URL, ApplicationUser remoteUser, JiraHelper jiraHelper) Deprecated.Description copied from interface:SimpleLinkManagerRecursively search through our sections within sections within sections within ... To find a section that contains a link that matches this URL- Specified by:
getSectionForURLin interfaceSimpleLinkManager- Parameters:
topLevelSection- The top level section from where to start searching!URL- The URL for the action e.g. https://jdog.atlassian.com/secure/project/ViewProjects.jspa. We check if this URL contains a web-item's path which is usually something shorter like /secure/project/ViewProjects.jsparemoteUser- The user that we are generating the list forjiraHelper- The context under which the list is being generated- Returns:
- Returns null if no section found
-
DynamicWebInterfaceManagerdirectly