com.atlassian.confluence.plugins.macros.dashboard
Class SpacesListMacro

java.lang.Object
  extended by com.atlassian.renderer.v2.macro.BaseMacro
      extended by com.atlassian.confluence.plugins.macros.dashboard.SpacesListMacro
All Implemented Interfaces:
com.atlassian.renderer.v2.macro.Macro

public class SpacesListMacro
extends com.atlassian.renderer.v2.macro.BaseMacro


Nested Class Summary
static class SpacesListMacro.Tabs
           
 
Field Summary
static String MACRO_NAME
           
 
Fields inherited from interface com.atlassian.renderer.v2.macro.Macro
RAW_PARAMS_KEY
 
Constructor Summary
SpacesListMacro()
           
 
Method Summary
protected  DashboardMacroSupport createDashboardMacroSupport()
          Instantiates DashboardMacroSupport.
 String execute(Map parameters, String body, com.atlassian.renderer.RenderContext renderContext)
           
 com.atlassian.renderer.v2.RenderMode getBodyRenderMode()
           
protected  DashboardMacroSupport getDashboardMacroSupport()
           
protected  Settings getGlobalSettings()
           
protected  I18NBean getI18n()
           
protected  Map<String,Object> getMacroVelocityContext()
           
 String getName()
           
 String getSelectedTeam(List<String> availableTeams, DashboardMacroSupport support)
           
 Map<String,List<Space>> getSortedRecentlyCreatedSpaces(DashboardMacroSupport support)
           
 Set<Space> getSpacesForLabels(String labels)
           
 List<Space> getSpacesForTeam(String selectedTeam)
           
 UserInterfaceState getUserInterfaceState()
           
 boolean hasBody()
           
protected  String renderMacro(Map contextMap, String velocityTemplatePath)
           
 void setLabelManager(LabelManager labelManager)
           
 void setLocaleManager(LocaleManager localeManager)
           
 void setPermissionManager(PermissionManager permissionManager)
           
 void setSettingsManager(SettingsManager settingsManager)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 
Methods inherited from class com.atlassian.renderer.v2.macro.BaseMacro
getTokenType, getWysiwygBodyType, isInline, suppressMacroRenderingDuringWysiwyg, suppressSurroundingTagDuringWysiwygRendering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MACRO_NAME

public static final String MACRO_NAME
See Also:
Constant Field Values
Constructor Detail

SpacesListMacro

public SpacesListMacro()
Method Detail

hasBody

public boolean hasBody()

getBodyRenderMode

public com.atlassian.renderer.v2.RenderMode getBodyRenderMode()

execute

public String execute(Map parameters,
                      String body,
                      com.atlassian.renderer.RenderContext renderContext)
               throws com.atlassian.renderer.v2.macro.MacroException
Throws:
com.atlassian.renderer.v2.macro.MacroException

getDashboardMacroSupport

protected DashboardMacroSupport getDashboardMacroSupport()

createDashboardMacroSupport

protected DashboardMacroSupport createDashboardMacroSupport()
Instantiates DashboardMacroSupport. This method is here because it is overridden in tests to instead provide a mock DashboardMacroSupport.

Returns:
A DashboradMacroSupport object.

renderMacro

protected String renderMacro(Map contextMap,
                             String velocityTemplatePath)
                      throws IOException
Throws:
IOException

getGlobalSettings

protected Settings getGlobalSettings()

getI18n

protected I18NBean getI18n()

getMacroVelocityContext

protected Map<String,Object> getMacroVelocityContext()

getName

public String getName()

getSelectedTeam

public String getSelectedTeam(List<String> availableTeams,
                              DashboardMacroSupport support)

getUserInterfaceState

public UserInterfaceState getUserInterfaceState()

getSpacesForLabels

public Set<Space> getSpacesForLabels(String labels)
Parameters:
labels - comma delimited list of labels
Returns:
spaces belonging to these labels

getSpacesForTeam

public List<Space> getSpacesForTeam(String selectedTeam)

getSortedRecentlyCreatedSpaces

public Map<String,List<Space>> getSortedRecentlyCreatedSpaces(DashboardMacroSupport support)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setLabelManager

public void setLabelManager(LabelManager labelManager)

setSettingsManager

public void setSettingsManager(SettingsManager settingsManager)

setLocaleManager

public void setLocaleManager(LocaleManager localeManager)

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)


Copyright © 2003–2015 Atlassian. All rights reserved.