com.atlassian.jira.plugin.webfragment
Interface SimpleLinkManager

All Known Implementing Classes:
DefaultSimpleLinkManager

public interface SimpleLinkManager

A manager that looks after generating lists of SimpleLink and SimpleLinkSection. This should be used in preference over the JiraWebInterfaceManager as this is more powerful due to being able produce links via SimpleLinkFactory. Though the links produced are more limited than what is available through interacting with JiraWebInterfaceManager directly.

Since:
v4.0

Method Summary
 java.util.List<SimpleLink> getLinksForSection(java.lang.String section, com.opensymphony.user.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLink for the given section.
 java.util.List<SimpleLink> getLinksForSectionIgnoreConditions(java.lang.String section, com.opensymphony.user.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLink for the given section, without filtering links using the conditions specified for the links.
 java.util.List<SimpleLinkSection> getSectionsForLocation(java.lang.String location, com.opensymphony.user.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLinkSection for the given location.
 boolean shouldLocationBeLazy(java.lang.String location, com.opensymphony.user.User remoteUser, JiraHelper jiraHelper)
          This determines whether a location should be loaded lazily if possible.
 boolean shouldSectionBeLazy(java.lang.String section)
          This determines whether an individual section should be loaded lazily if possible.
 

Method Detail

shouldLocationBeLazy

boolean shouldLocationBeLazy(java.lang.String location,
                             com.opensymphony.user.User remoteUser,
                             JiraHelper jiraHelper)
This determines whether a location should be loaded lazily if possible.

Parameters:
location - The location to check for
remoteUser - The user that we are generating the list for
jiraHelper - The context under which the list is being generated
Returns:
true if the loaction should be loaded lazily if possible, false otherwise

shouldSectionBeLazy

boolean shouldSectionBeLazy(java.lang.String section)
This determines whether an individual section should be loaded lazily if possible.

Parameters:
section - The section to check for
Returns:
true if the section should be loaded lazily if possible, false otherwise

getLinksForSection

@NotNull
java.util.List<SimpleLink> getLinksForSection(@NotNull
                                                      java.lang.String section,
                                                      com.opensymphony.user.User remoteUser,
                                                      @NotNull
                                                      JiraHelper jiraHelper)
Gets a list of SimpleLink for the given section.

Parameters:
section - The section to generate the list for
remoteUser - The user that we are generating the list for
jiraHelper - The context under which the list is being generated
Returns:
The list of links for the given section

getLinksForSectionIgnoreConditions

@NotNull
java.util.List<SimpleLink> getLinksForSectionIgnoreConditions(@NotNull
                                                                      java.lang.String section,
                                                                      com.opensymphony.user.User remoteUser,
                                                                      @NotNull
                                                                      JiraHelper jiraHelper)
Gets a list of SimpleLink for 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.

Parameters:
section - The section to generate the list for
remoteUser - The user that we are generating the list for
jiraHelper - The context under which the list is being generated
Returns:
The list of links for the given section

getSectionsForLocation

@NotNull
java.util.List<SimpleLinkSection> getSectionsForLocation(@NotNull
                                                                 java.lang.String location,
                                                                 com.opensymphony.user.User remoteUser,
                                                                 @NotNull
                                                                 JiraHelper jiraHelper)
Gets a list of SimpleLinkSection for the given location.

Parameters:
location - The location to generate the list for
remoteUser - The user that we are generating the list for
jiraHelper - The context under which the list is being generated
Returns:
The list of sections for the give location


Copyright © 2002-2010 Atlassian. All Rights Reserved.