View Javadoc
1   package com.atlassian.plugin.web;
2   
3   import com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor;
4   import com.atlassian.plugin.web.descriptors.WebPanelModuleDescriptor;
5   import com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor;
6   import com.atlassian.plugin.web.model.WebPanel;
7   
8   import java.util.List;
9   import java.util.Map;
10  
11  /**
12   * A simple manager to provide sections of the web interface through plugins.
13   */
14  public interface WebInterfaceManager {
15      /**
16       * @return True if there are any sections for the given location.
17       */
18      boolean hasSectionsForLocation(String location);
19  
20      /**
21       * @return A list of all WebSectionModuleDescriptors for the given location.
22       * @deprecated as of 3.0.2 use {@link com.atlassian.plugin.web.api.DynamicWebInterfaceManager#getWebSections(String, java.util.Map)}
23       */
24      List<WebSectionModuleDescriptor> getSections(String location);
25  
26      /**
27       * @return A list of all AbstractWebLinkFragmentModuleDescriptor <i>viewable in a given context</i> in the given location.
28       * @deprecated as of 3.0.2 use {@link com.atlassian.plugin.web.api.DynamicWebInterfaceManager#getDisplayableWebSections(String, java.util.Map)}
29       */
30      List<WebSectionModuleDescriptor> getDisplayableSections(String location, Map<String, Object> context);
31  
32      /**
33       * @return A list of all WebItemModuleDescriptors for the given section.
34       * @deprecated as of 3.0.2 use {@link com.atlassian.plugin.web.api.DynamicWebInterfaceManager#getWebItems(String, java.util.Map)}
35       */
36      List<WebItemModuleDescriptor> getItems(String section);
37  
38      /**
39       * @return A list of all AbstractWebLinkFragmentModuleDescriptor <i>viewable in a given context</i> in the given section.
40       * @deprecated as of 3.0.2 use {@link com.atlassian.plugin.web.api.DynamicWebInterfaceManager#getDisplayableWebItems(String, java.util.Map)}
41       */
42      List<WebItemModuleDescriptor> getDisplayableItems(String section, Map<String, Object> context);
43  
44      /**
45       * @param location
46       * @return A list of all {@link com.atlassian.plugin.web.model.WebPanel} module instances
47       * for the given location.
48       */
49      List<WebPanel> getWebPanels(String location);
50  
51      /**
52       * @param location
53       * @param context
54       * @return A list of all {@link com.atlassian.plugin.web.model.WebPanel} module instances
55       * <i>viewable in a given context</i> in the given location.
56       */
57      List<WebPanel> getDisplayableWebPanels(String location, Map<String, Object> context);
58  
59      /**
60       * @param location
61       * @return A list of all {@link com.atlassian.plugin.web.descriptors.WebPanelModuleDescriptor} module instances
62       * for the given location.
63       */
64      List<WebPanelModuleDescriptor> getWebPanelDescriptors(String location);
65  
66      /**
67       * @param location
68       * @param context
69       * @return A list of all {@link com.atlassian.plugin.web.descriptors.WebPanelModuleDescriptor} module instances
70       * <i>viewable in a given context</i> in the given location.
71       */
72      List<WebPanelModuleDescriptor> getDisplayableWebPanelDescriptors(String location, Map<String, Object> context);
73  
74      /**
75       * Refresh the contents of the web interface manager.
76       */
77      void refresh();
78  
79      /**
80       * @return The web fragment helper for this implementation.
81       */
82      WebFragmentHelper getWebFragmentHelper();
83  }