@Service(value="org.squashtest.tm.service.customreport.CustomReportDashboardService") public class CustomReportDashboardServiceImpl extends Object implements CustomReportDashboardService
| Modifier and Type | Field and Description |
|---|---|
protected PermissionEvaluationService |
permissionService |
| Constructor and Description |
|---|
CustomReportDashboardServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindChart(org.squashtest.tm.domain.customreport.CustomReportChartBinding newBinding)
Bind a chart to a dashboard
|
boolean |
canShowDashboardInWorkspace(org.squashtest.tm.domain.Workspace workspace)
Check if dashboard id in user prefs is valid
|
org.squashtest.tm.domain.customreport.CustomReportChartBinding |
changeBindedChart(long bindingId,
long chartNodeId)
Change the chartbinded by the
CustomReportChartBinding designed by bindingId. |
void |
chooseFavoriteDashboardForCurrentUser(org.squashtest.tm.domain.Workspace workspace,
long nodeId)
Set the dashboard as favorite.
|
org.squashtest.tm.domain.customreport.CustomReportDashboard |
findById(Long id) |
boolean |
shouldShowFavoriteDashboardInWorkspace(org.squashtest.tm.domain.Workspace workspace)
Check if user prefs said that we should show a dashboard on home page
|
void |
unbindChart(Long id)
remove designed binding from database
|
void |
updateGridPosition(List<org.squashtest.tm.domain.customreport.CustomReportChartBinding> transientBindings)
Update all bindings position given in argument.
|
@Inject protected PermissionEvaluationService permissionService
public org.squashtest.tm.domain.customreport.CustomReportDashboard findById(Long id)
findById in interface CustomReportDashboardService@PreAuthorize(value="hasPermission(#newBinding.dashboard.id, \'org.squashtest.tm.domain.customreport.CustomReportDashboard\' ,\'WRITE\') or hasRole(\'ROLE_ADMIN\')") public void bindChart(org.squashtest.tm.domain.customreport.CustomReportChartBinding newBinding)
CustomReportDashboardServicebindChart in interface CustomReportDashboardServicepublic void updateGridPosition(List<org.squashtest.tm.domain.customreport.CustomReportChartBinding> transientBindings)
CustomReportDashboardServiceupdateGridPosition in interface CustomReportDashboardService@PreAuthorize(value="hasPermission(#id, \'org.squashtest.tm.domain.customreport.CustomReportChartBinding\' ,\'WRITE\') or hasRole(\'ROLE_ADMIN\')") public void unbindChart(Long id)
CustomReportDashboardServiceunbindChart in interface CustomReportDashboardService@PreAuthorize(value="hasPermission(#bindingId, \'org.squashtest.tm.domain.customreport.CustomReportChartBinding\' ,\'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.customreport.CustomReportChartBinding changeBindedChart(long bindingId,
long chartNodeId)
CustomReportDashboardServiceCustomReportChartBinding designed by bindingId.
WARNING: the chartNodeId param is the CustomReportLibraryNode id, not the ChartDefinition id.
This is because the user manipulate the tree node not the entity directlychangeBindedChart in interface CustomReportDashboardServicepublic void chooseFavoriteDashboardForCurrentUser(org.squashtest.tm.domain.Workspace workspace,
long nodeId)
CustomReportDashboardServicechooseFavoriteDashboardForCurrentUser in interface CustomReportDashboardServicenodeId - This is the CustomReportLibraryNode id not the CustomReportDashboard idpublic boolean shouldShowFavoriteDashboardInWorkspace(org.squashtest.tm.domain.Workspace workspace)
CustomReportDashboardServiceshouldShowFavoriteDashboardInWorkspace in interface CustomReportDashboardServicepublic boolean canShowDashboardInWorkspace(org.squashtest.tm.domain.Workspace workspace)
CustomReportDashboardServicecanShowDashboardInWorkspace in interface CustomReportDashboardServiceCopyright © 2010–2017 Henix, henix.fr. All rights reserved.