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
_categoryProviderEP
The catgeory providerprotected CurrentUserProvider
_currentUserProvider
The current user providerprotected ProjectManager
_projectManager
The project managerprotected RightManager
_rightManager
The right managerstatic String
REPORT_ALL_RIGHT_ID
The right id to report all projectstatic String
REPORT_SERVICE_ID
The id of reports servicestatic String
ROLE
Avalon Role
-
Constructor Summary
Constructors Constructor Description ReportHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)boolean
hasSuperRight()
Determines if the current user has right to access to all project's reportsvoid
service(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:
service
in 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
-
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
-
-