com.atlassian.gadgets.dashboard
Interface DashboardService


public interface DashboardService

Service that saves or fetches the DashboardState, after checking to make sure that the user has access to the dashboard.


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.
 

Method Detail

get

DashboardState get(DashboardId id,
                   @Nullable
                   String username)
                   throws PermissionException
Fetch the DashboardState if the user has permission.

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

DashboardState save(DashboardState state,
                    @Nullable
                    String username)
                    throws PermissionException
Save the DashboardState if the user has permission.

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 © 2011 Atlassian. All Rights Reserved.