Class AbstractPluggableTabPanelAction<TabPanelClass extends PluggableTabPanelModuleDescriptor>

java.lang.Object
webwork.action.ActionSupport
All Implemented Interfaces:
ErrorCollection, I18nHelper, HttpServletVariables, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
ViewProfile

public abstract class AbstractPluggableTabPanelAction<TabPanelClass extends PluggableTabPanelModuleDescriptor> extends IssueActionSupport
Manages the setting, retrieval, checking and activating of a "selected tab" for any page that wishes to provide navigation to "tab panels".
Since:
v6.1
See Also:
  • Field Details

    • pluginAccessor

      protected final com.atlassian.plugin.PluginAccessor pluginAccessor
  • Constructor Details

  • Method Details

    • getTabPanels

      public List<TabPanelClass> getTabPanels()
      Returns:
      A list of AbstractPluggableTabPanelAction objects, never null
    • initTabPanels

      protected List<TabPanelClass> initTabPanels()
      Retrieves and initialises the tab panels via the plugin accessor
      Returns:
      list of AbstractPluggableTabPanelAction objects, never null
      Since:
      v3.10
    • getTabPanelModuleDescriptors

      protected abstract List<TabPanelClass> getTabPanelModuleDescriptors()
      Retrieves the tab panels for this page via the plugin accessor.

      Used by initialisation method to collect the list of tab panels for this page

    • isTabPanelHidden

      protected abstract boolean isTabPanelHidden(TabPanelClass descriptor) throws PermissionException
      Returns true if the tab panel of the given descriptor should be hidden from the current view
      Parameters:
      descriptor - module descriptor
      Returns:
      true if hidden, false otherwise
      Throws:
      PermissionException - if project is invalid or not visible to the current user
      Since:
      v3.10
    • canSeeTab

      protected boolean canSeeTab(String tabKey)
    • getSelectedTabPanel

      public TabPanelClass getSelectedTabPanel()
    • getSelected

      public String getSelected()
    • getSelectedTab

      protected String getSelectedTab()
      Retrieve the name of the tab panel that is selected.

      Protected because it's used in some error log messages.

      Returns:
      The complete module key of the selected tab. If no tab is currently selected, it will return the first available tab on the page. If there are no tabs to select, returns null.
    • setSelectedTab

      public void setSelectedTab(String selectedTab)
      Set the name of the selected tab.

      Used by JiraSafeActionParameterSetter.setActionProperty(java.lang.reflect.Method, webwork.action.Action, String[]).

      Parameters:
      selectedTab - a complete module descriptor key for the AbstractPluggableTabPanelAction to set as the selected tab.