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, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLink for the given section.
 List<SimpleLink> getLinksForSection(String section, User remoteUser, JiraHelper jiraHelper)
          Deprecated. Please use getLinksForSection(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3
 List<SimpleLink> getLinksForSectionIgnoreConditions(String section, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLink for the given section, without filtering links using the conditions specified for the links.
 List<SimpleLink> getLinksForSectionIgnoreConditions(String section, User remoteUser, JiraHelper jiraHelper)
          Deprecated. Please use getLinksForSectionIgnoreConditions(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3
 List<SimpleLinkSection> getNotEmptySectionsForLocation(String location, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLinkSection for the given location, that have either web-items or other web-sections within them.
 List<SimpleLinkSection> getNotEmptySectionsForLocation(String location, User remoteUser, JiraHelper jiraHelper)
          Deprecated. Please use getSectionsForLocation(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3
 SimpleLinkSection getSectionForURL(String topLevelSection, String URL, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          Recursively search through our sections within sections within sections within ...
 List<SimpleLinkSection> getSectionsForLocation(String location, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          Gets a list of SimpleLinkSection for the given location.
 List<SimpleLinkSection> getSectionsForLocation(String location, User remoteUser, JiraHelper jiraHelper)
          Deprecated. Please use getSectionsForLocation(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3
 boolean shouldLocationBeLazy(String location, com.atlassian.crowd.embedded.api.User remoteUser, JiraHelper jiraHelper)
          This determines whether a location should be loaded lazily if possible.
 boolean shouldLocationBeLazy(String location, User remoteUser, JiraHelper jiraHelper)
          Deprecated. Please use shouldLocationBeLazy(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3
 boolean shouldSectionBeLazy(String section)
          This determines whether an individual section should be loaded lazily if possible.
 

Method Detail

shouldLocationBeLazy

boolean shouldLocationBeLazy(String location,
                             com.atlassian.crowd.embedded.api.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

shouldLocationBeLazy

boolean shouldLocationBeLazy(String location,
                             User remoteUser,
                             JiraHelper jiraHelper)
Deprecated. Please use shouldLocationBeLazy(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3

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,
                                            com.atlassian.crowd.embedded.api.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

getLinksForSection

@NotNull
List<SimpleLink> getLinksForSection(@NotNull
                                            String section,
                                            User remoteUser,
                                            @NotNull
                                            JiraHelper jiraHelper)
Deprecated. Please use getLinksForSection(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3

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
List<SimpleLink> getLinksForSectionIgnoreConditions(@NotNull
                                                            String section,
                                                            com.atlassian.crowd.embedded.api.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

getLinksForSectionIgnoreConditions

@NotNull
List<SimpleLink> getLinksForSectionIgnoreConditions(@NotNull
                                                            String section,
                                                            User remoteUser,
                                                            @NotNull
                                                            JiraHelper jiraHelper)
Deprecated. Please use getLinksForSectionIgnoreConditions(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3

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
List<SimpleLinkSection> getSectionsForLocation(@NotNull
                                                       String location,
                                                       com.atlassian.crowd.embedded.api.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

getSectionsForLocation

@NotNull
List<SimpleLinkSection> getSectionsForLocation(@NotNull
                                                       String location,
                                                       User remoteUser,
                                                       @NotNull
                                                       JiraHelper jiraHelper)
Deprecated. Please use getSectionsForLocation(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3

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

getSectionForURL

SimpleLinkSection getSectionForURL(@NotNull
                                   String topLevelSection,
                                   @NotNull
                                   String URL,
                                   com.atlassian.crowd.embedded.api.User remoteUser,
                                   JiraHelper jiraHelper)
Recursively search through our sections within sections within sections within ... To find a section that contains a link that matches this URL

Parameters:
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.jspa
topLevelSection - The top level section from where to start searching!
remoteUser - The user that we are generating the list for
jiraHelper - The context under which the list is being generated
Returns:
Returns null if no section found

getNotEmptySectionsForLocation

@NotNull
List<SimpleLinkSection> getNotEmptySectionsForLocation(@NotNull
                                                               String location,
                                                               com.atlassian.crowd.embedded.api.User remoteUser,
                                                               @NotNull
                                                               JiraHelper jiraHelper)
Gets a list of SimpleLinkSection for the given location, that have either web-items or other web-sections within them.

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

getNotEmptySectionsForLocation

@NotNull
List<SimpleLinkSection> getNotEmptySectionsForLocation(@NotNull
                                                               String location,
                                                               User remoteUser,
                                                               @NotNull
                                                               JiraHelper jiraHelper)
Deprecated. Please use getSectionsForLocation(String, com.atlassian.crowd.embedded.api.User, com.atlassian.jira.plugin.webfragment.model.JiraHelper) instead. Since v4.3

Gets a list of SimpleLinkSection for the given location, that have either web-items or other web-sections within them.

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-2012 Atlassian. All Rights Reserved.