View Javadoc

1   package com.atlassian.plugin.web;
2   
3   import com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor;
4   import com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor;
5   
6   import java.util.List;
7   import java.util.Map;
8   
9   /**
10   * A simple manager to provide sections of the web interface through plugins.
11   */
12  public interface WebInterfaceManager
13  {
14      /**
15       * @return True if there are any sections for the given location.
16       */
17      boolean hasSectionsForLocation(String location);
18  
19      /**
20       * @return A list of all WebSectionModuleDescriptors for the given location.
21       */
22      List<WebSectionModuleDescriptor> getSections(String location);
23  
24      /**
25       * @return A list of all AbstractWebFragmentModuleDescriptor <i>viewable in a given context</i> in the given location.
26       */
27      List<WebSectionModuleDescriptor> getDisplayableSections(String location, Map<String,Object> context);
28  
29      /**
30       * @return A list of all WebItemModuleDescriptors for the given section.
31       */
32      List<WebItemModuleDescriptor> getItems(String section);
33  
34      /**
35       * @return A list of all AbstractWebFragmentModuleDescriptor <i>viewable in a given context</i> in the given section.
36       */
37      List<WebItemModuleDescriptor> getDisplayableItems(String section, Map<String,Object> context);
38  
39      /**
40       * Refresh the contents of the web interface manager.
41       */
42      void refresh();
43  
44      /**
45       * @return The web fragment helper for this implementation.
46       */
47      WebFragmentHelper getWebFragmentHelper();
48  }