com.atlassian.gadgets.dashboard.internal.impl
Class DashboardServiceImpl

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.internal.impl.DashboardServiceImpl
All Implemented Interfaces:
DashboardService

public class DashboardServiceImpl
extends Object
implements DashboardService

Default implementation of DashboardService.


Constructor Summary
DashboardServiceImpl(TransactionalDashboardStateStoreImpl stateStore, PermissionService permissionService)
          Constructor.
 
Method Summary
 DashboardState get(DashboardId id, String username)
          Fetch the DashboardState if the user has permission.
 DashboardState save(DashboardState state, String username)
          Save the DashboardState if the user has permission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardServiceImpl

public DashboardServiceImpl(TransactionalDashboardStateStoreImpl stateStore,
                            PermissionService permissionService)
Constructor.

Parameters:
stateStore - the dashboard state store to use
permissionService - the permissions to validate users by
Method Detail

get

public DashboardState get(DashboardId id,
                          String username)
                   throws PermissionException
Description copied from interface: DashboardService
Fetch the DashboardState if the user has permission.

Specified by:
get in interface DashboardService
Parameters:
id - Id of the dashboard to fetch.
username - Username of the user to check permissions on, or null if no user is logged in
Returns:
DashboardState for the given DashboardId
Throws:
PermissionException - thrown if the user does not have permission to read the dashboard

save

public DashboardState save(DashboardState state,
                           String username)
                    throws PermissionException
Description copied from interface: DashboardService
Save the DashboardState if the user has permission.

Specified by:
save in interface DashboardService
Parameters:
state - DashboardState to save.
username - Username of the user to check permissions on, or null if no user is logged in
Returns:
refreshed DashboardState after the state object has been saved
Throws:
PermissionException - thrown if the user does not have permission to modify the dashboard


Copyright © 2010 Atlassian. All Rights Reserved.