Class ReportHelper
- java.lang.Object
-
- org.ametys.plugins.workspaces.report.ReportHelper
-
- All Implemented Interfaces:
Component,Serviceable
public class ReportHelper extends Object implements Serviceable, Component
Component for reporting projects
-
-
Field Summary
Fields Modifier and Type Field Description protected CategoryProviderExtensionPoint_categoryProviderEPThe catgeory providerprotected CurrentUserProvider_currentUserProviderThe current user providerprotected ProjectManager_projectManagerThe project managerprotected RightManager_rightManagerThe right managerstatic StringREPORT_ALL_RIGHT_IDThe right id to report all projectstatic StringREPORT_SERVICE_IDThe id of reports servicestatic StringROLEAvalon Role
-
Constructor Summary
Constructors Constructor Description ReportHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Category_getRootCategory(Category category)private boolean_matchCategories(Project project, List<String> filteredCategories)Set<Category>getAvailableCategories(List<Project> projects)Get the available root categoriesList<Project>getAvailableProjects()Get the available projects (the manager's project)List<Project>getAvailableProjects(List<String> filteredProjects, List<String> filteredCategories)Get the available projects (the manager's project)booleanhasSuperRight()Determines if the current user has right to access to all project's reportsvoidservice(ServiceManager manager)
-
-
-
Field Detail
-
REPORT_ALL_RIGHT_ID
public static final String REPORT_ALL_RIGHT_ID
The right id to report all project- See Also:
- Constant Field Values
-
REPORT_SERVICE_ID
public static final String REPORT_SERVICE_ID
The id of reports service- See Also:
- Constant Field Values
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_projectManager
protected ProjectManager _projectManager
The project manager
-
_rightManager
protected RightManager _rightManager
The right manager
-
_categoryProviderEP
protected CategoryProviderExtensionPoint _categoryProviderEP
The catgeory provider
-
-
Constructor Detail
-
ReportHelper
public ReportHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getAvailableProjects
public List<Project> getAvailableProjects()
Get the available projects (the manager's project)- Returns:
- the available projects for reports
-
hasSuperRight
public boolean hasSuperRight()
Determines if the current user has right to access to all project's reports- Returns:
- if the current user has right to access to all project's reports
-
getAvailableProjects
public List<Project> getAvailableProjects(List<String> filteredProjects, List<String> filteredCategories)
Get the available projects (the manager's project)- Parameters:
filteredProjects- the filtered projectsfilteredCategories- the filtered categories- Returns:
- the available projects for reports
-
_matchCategories
private boolean _matchCategories(Project project, List<String> filteredCategories)
-
getAvailableCategories
public Set<Category> getAvailableCategories(List<Project> projects)
Get the available root categories- Parameters:
projects- the projects- Returns:
- the available categories from the given projects
-
_getRootCategory
private Category _getRootCategory(Category category)
-
-