com.atlassian.gadgets.dashboard.internal.velocity
Class VelocityViewFactory

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.internal.velocity.VelocityViewFactory
All Implemented Interfaces:
DashboardTabViewFactory

public class VelocityViewFactory
extends Object
implements DashboardTabViewFactory


Constructor Summary
VelocityViewFactory(com.atlassian.templaterenderer.TemplateRenderer renderer, StateConverter stateConverter, PermissionService permissionService, RepresentationFactory representationFactory, DashboardEmbedder dashboardEmbedder)
           
 
Method Summary
 ViewComponent createDashboardView(Iterable<DashboardTab> tabs, DashboardState selectedTabDashboardState, String username, int maxGadgets, GadgetRequestContext gadgetRequestContext)
          Returns a ViewComponent that will render the DashboardState and DashboardTabs customizing the view based on the permissions the user has to view/edit the dashboard and the specified Locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityViewFactory

public VelocityViewFactory(com.atlassian.templaterenderer.TemplateRenderer renderer,
                           StateConverter stateConverter,
                           PermissionService permissionService,
                           RepresentationFactory representationFactory,
                           DashboardEmbedder dashboardEmbedder)
Method Detail

createDashboardView

public ViewComponent createDashboardView(Iterable<DashboardTab> tabs,
                                         DashboardState selectedTabDashboardState,
                                         @Nullable
                                         String username,
                                         int maxGadgets,
                                         GadgetRequestContext gadgetRequestContext)
Description copied from interface: DashboardTabViewFactory

Returns a ViewComponent that will render the DashboardState and DashboardTabs customizing the view based on the permissions the user has to view/edit the dashboard and the specified Locale.

This can be used by host applications to place dashboards in a place of their choosing, including tabs to navigate to other dashboards.

Specified by:
createDashboardView in interface DashboardTabViewFactory
Parameters:
tabs - a list of dashboards a particular user can see. This can be empty if no tabs are desired.
selectedTabDashboardState - state of the dashboard to be rendered by the ViewComponent
username - user that is viewing the dashboard and whose permissions will be checked
maxGadgets - the (application-wide) maximum number of supported gadgets
gadgetRequestContext - the context of this request
Returns:
a ViewComponent that will render the DashboardState


Copyright © 2010 Atlassian. All Rights Reserved.