com.atlassian.plugin.web
Class DefaultWebInterfaceManager

java.lang.Object
  extended by com.atlassian.plugin.web.DefaultWebInterfaceManager
All Implemented Interfaces:
WebInterfaceManager

public class DefaultWebInterfaceManager
extends Object
implements WebInterfaceManager

Stores and manages flexible web interface sections available in the system.


Field Summary
static WeightedDescriptorComparator WEIGHTED_DESCRIPTOR_COMPARATOR
           
 
Constructor Summary
DefaultWebInterfaceManager()
           
DefaultWebInterfaceManager(com.atlassian.plugin.PluginAccessor pluginAccessor, WebFragmentHelper webFragmentHelper)
           
 
Method Summary
 List<WebItemModuleDescriptor> getDisplayableItems(String section, Map<String,Object> context)
           
 List<WebSectionModuleDescriptor> getDisplayableSections(String location, Map<String,Object> context)
           
 List<WebPanelModuleDescriptor> getDisplayableWebPanelDescriptors(String location, Map<String,Object> context)
           
 List<WebPanel> getDisplayableWebPanels(String location, Map<String,Object> context)
           
 List<WebItemModuleDescriptor> getItems(String section)
           
 List<WebSectionModuleDescriptor> getSections(String location)
           
 WebFragmentHelper getWebFragmentHelper()
           
 List<WebPanelModuleDescriptor> getWebPanelDescriptors(String location)
           
 List<WebPanel> getWebPanels(String location)
           
 boolean hasSectionsForLocation(String location)
           
 void refresh()
          Refresh the contents of the web interface manager.
 void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 void setPluginManager(com.atlassian.plugin.PluginManager pluginManager)
          Deprecated. since 2.2.0, use setPluginAccessor(PluginAccessor) instead
 void setWebFragmentHelper(WebFragmentHelper webFragmentHelper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEIGHTED_DESCRIPTOR_COMPARATOR

public static final WeightedDescriptorComparator WEIGHTED_DESCRIPTOR_COMPARATOR
Constructor Detail

DefaultWebInterfaceManager

public DefaultWebInterfaceManager()

DefaultWebInterfaceManager

public DefaultWebInterfaceManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
                                  WebFragmentHelper webFragmentHelper)
Method Detail

hasSectionsForLocation

public boolean hasSectionsForLocation(String location)
Specified by:
hasSectionsForLocation in interface WebInterfaceManager
Returns:
True if there are any sections for the given location.

getSections

public List<WebSectionModuleDescriptor> getSections(String location)
Specified by:
getSections in interface WebInterfaceManager
Returns:
A list of all WebSectionModuleDescriptors for the given location.

getDisplayableSections

public List<WebSectionModuleDescriptor> getDisplayableSections(String location,
                                                               Map<String,Object> context)
Specified by:
getDisplayableSections in interface WebInterfaceManager
Returns:
A list of all AbstractWebLinkFragmentModuleDescriptor viewable in a given context in the given location.

getItems

public List<WebItemModuleDescriptor> getItems(String section)
Specified by:
getItems in interface WebInterfaceManager
Returns:
A list of all WebItemModuleDescriptors for the given section.

getDisplayableItems

public List<WebItemModuleDescriptor> getDisplayableItems(String section,
                                                         Map<String,Object> context)
Specified by:
getDisplayableItems in interface WebInterfaceManager
Returns:
A list of all AbstractWebLinkFragmentModuleDescriptor viewable in a given context in the given section.

getDisplayableWebPanels

public List<WebPanel> getDisplayableWebPanels(String location,
                                              Map<String,Object> context)
Specified by:
getDisplayableWebPanels in interface WebInterfaceManager
Returns:
A list of all WebPanel module instances viewable in a given context in the given location.

getDisplayableWebPanelDescriptors

public List<WebPanelModuleDescriptor> getDisplayableWebPanelDescriptors(String location,
                                                                        Map<String,Object> context)
Specified by:
getDisplayableWebPanelDescriptors in interface WebInterfaceManager
Returns:
A list of all WebPanelModuleDescriptor module instances viewable in a given context in the given location.

getWebPanels

public List<WebPanel> getWebPanels(String location)
Specified by:
getWebPanels in interface WebInterfaceManager
Returns:
A list of all WebPanel module instances for the given location.

getWebPanelDescriptors

public List<WebPanelModuleDescriptor> getWebPanelDescriptors(String location)
Specified by:
getWebPanelDescriptors in interface WebInterfaceManager
Returns:
A list of all WebPanelModuleDescriptor module instances for the given location.

refresh

public void refresh()
Description copied from interface: WebInterfaceManager
Refresh the contents of the web interface manager.

Specified by:
refresh in interface WebInterfaceManager

setPluginManager

@Deprecated
public void setPluginManager(com.atlassian.plugin.PluginManager pluginManager)
Deprecated. since 2.2.0, use setPluginAccessor(PluginAccessor) instead

Parameters:
pluginManager -

setPluginAccessor

public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
Parameters:
pluginAccessor - The plugin accessor to set
Since:
2.2.0

setWebFragmentHelper

public void setWebFragmentHelper(WebFragmentHelper webFragmentHelper)

getWebFragmentHelper

public WebFragmentHelper getWebFragmentHelper()
Specified by:
getWebFragmentHelper in interface WebInterfaceManager
Returns:
The web fragment helper for this implementation.


Copyright © 2014 Atlassian. All rights reserved.