|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.gadgets.dashboard.internal.impl.DashboardServiceImpl
public class DashboardServiceImpl
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 |
---|
public DashboardServiceImpl(TransactionalDashboardStateStoreImpl stateStore, PermissionService permissionService)
stateStore
- the dashboard state store to usepermissionService
- the permissions to validate users byMethod Detail |
---|
public DashboardState get(DashboardId id, String username) throws PermissionException
DashboardService
DashboardState
if the user has permission.
get
in interface DashboardService
id
- Id of the dashboard to fetch.username
- Username of the user to check permissions on, or null if no user is logged in
DashboardState
for the given DashboardId
PermissionException
- thrown if the user does not have permission to read the dashboardpublic DashboardState save(DashboardState state, String username) throws PermissionException
DashboardService
DashboardState
if the user has permission.
save
in interface DashboardService
state
- DashboardState
to save.username
- Username of the user to check permissions on, or null if no user is logged in
DashboardState
after the state object has been saved
PermissionException
- thrown if the user does not have permission to modify the dashboard
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |