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

java.lang.Object
  extended by com.atlassian.confluence.plugins.macros.dashboard.AbstractTab
      extended by com.atlassian.confluence.plugins.macros.dashboard.FavouriteSpacesTab
All Implemented Interfaces:
RecentlyUpdatedMacroTab

public class FavouriteSpacesTab
extends AbstractTab

Implements the "Favourite Spaces" tab, which displays updates from a user's favourite spaces.


Constructor Summary
FavouriteSpacesTab(LabelManager labelManager, PermissionManager permissionManager)
           
 
Method Summary
 Set<String> getFavouriteSpaceKeys(com.atlassian.user.User user)
           
 String getName()
           
 RecentUpdateQueryParameters getQueryParameters(RecentlyUpdatedMacroParams macroParams, RecentlyUpdatedMacroRequestParams requestParams, com.atlassian.renderer.RenderContext renderContext)
           
 Map<String,Object> getVelocityContext(RecentlyUpdatedMacroRequestParams requestParams, com.atlassian.renderer.RenderContext renderContext)
          Gives each tab a chance to add things to the macro's velocity context
 boolean shouldDisplay(com.atlassian.renderer.RenderContext renderContext)
           
 
Methods inherited from class com.atlassian.confluence.plugins.macros.dashboard.AbstractTab
getUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FavouriteSpacesTab

public FavouriteSpacesTab(LabelManager labelManager,
                          PermissionManager permissionManager)
Method Detail

getName

public String getName()
Returns:
the identifier for this tab. Should be a short, lowercase string that is unique to each tab.

shouldDisplay

public boolean shouldDisplay(com.atlassian.renderer.RenderContext renderContext)
Parameters:
renderContext - The macro rendering context
Returns:
true if the tab should be visible in the provided context.

getQueryParameters

public RecentUpdateQueryParameters getQueryParameters(RecentlyUpdatedMacroParams macroParams,
                                                      RecentlyUpdatedMacroRequestParams requestParams,
                                                      com.atlassian.renderer.RenderContext renderContext)
Parameters:
macroParams - Settings passed in via macro parameters
requestParams - Settings passed in via request parameters
renderContext - The macro rendering context
Returns:
the query parameters that are used to display search results on this tab.

getVelocityContext

public Map<String,Object> getVelocityContext(RecentlyUpdatedMacroRequestParams requestParams,
                                             com.atlassian.renderer.RenderContext renderContext)
Description copied from interface: RecentlyUpdatedMacroTab
Gives each tab a chance to add things to the macro's velocity context

Parameters:
requestParams - Settings passed in via request parameters
renderContext - Settings passed in via macro parameters
Returns:
A map of key/value pairs that the tab wants added to the Velocity context

getFavouriteSpaceKeys

public Set<String> getFavouriteSpaceKeys(com.atlassian.user.User user)


Copyright © 2003-2012 Atlassian. All Rights Reserved.