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
 List<SimpleLink> getLinksForSection(String section, User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLink for the given section.
 List<SimpleLinkSection> getSectionsForLocation(String location, User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLinkSection for the given location.
 boolean shouldLocationBeLazy(String location, User remoteUser, JiraHelper jiraHelper)
          This determines whether a location should be loaded lazily if possible.
 boolean shouldSectionBeLazy(String section)
          This determines whether an individual section should be loaded lazily if possible.
 

Method Detail

shouldLocationBeLazy

boolean shouldLocationBeLazy(String location,
                             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(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
List<SimpleLink> getLinksForSection(@NotNull
                                            String section,
                                            User remoteUser,
                                            @NotNull
                                            JiraHelper jiraHelper)
Gets a list of SimpleLink for the given section.

Parameters:
section - The section to generate teh 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
List<SimpleLinkSection> getSectionsForLocation(@NotNull
                                                       String location,
                                                       User remoteUser,
                                                       @NotNull
                                                       JiraHelper jiraHelper)
Gets a list of SimpleLinkSection for the given location.

Parameters:
location - The location to generate teh 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-2009 Atlassian. All Rights Reserved.