Class ReportHelper
java.lang.Object
org.ametys.plugins.workspaces.report.ReportHelper
- All Implemented Interfaces:
Component
,Serviceable
Component for reporting projects
-
Field Summary
Modifier and TypeFieldDescriptionprotected CategoryProviderExtensionPoint
The catgeory providerprotected CurrentUserProvider
The current user providerprotected ProjectManager
The project managerprotected RightManager
The right managerstatic final String
The right id to report all projectstatic final String
The id of reports servicestatic final String
Avalon Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAvailableCategories
(List<Project> projects) Get the available root categoriesGet the available projects (the manager's project)getAvailableProjects
(List<String> filteredProjects, List<String> filteredCategories) Get the available projects (the manager's project)boolean
Determines if the current user has right to access to all project's reportsboolean
hasSuperRight
(UserIdentity user) Determines if a user has right to access to all project's reportsvoid
service
(ServiceManager manager)
-
Field Details
-
ROLE
Avalon Role -
REPORT_ALL_RIGHT_ID
The right id to report all project- See Also:
-
REPORT_SERVICE_ID
The id of reports service- See Also:
-
_currentUserProvider
The current user provider -
_projectManager
The project manager -
_rightManager
The right manager -
_categoryProviderEP
The catgeory provider
-
-
Constructor Details
-
ReportHelper
public ReportHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getAvailableProjects
Get the available projects (the manager's project)- Returns:
- the available projects for reports
-
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
-
hasSuperRight
Determines if a user has right to access to all project's reports- Parameters:
user
- the user to check- Returns:
- if the 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
Get the available root categories- Parameters:
projects
- the projects- Returns:
- the available categories from the given projects
-