Package org.ametys.web.population
Class PopulationContextHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.user.population.PopulationContextHelper
-
- org.ametys.web.population.PopulationContextHelper
-
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class PopulationContextHelper extends PopulationContextHelper
Helper for associatingUserPopulation
s to contexts. This override allows a user to get user populations on a 'site' context if user belongs to the BO+FO site context ('/sites/SITENAME') or FO site context ('/sites-fo/SITENAME')
-
-
Field Summary
-
Fields inherited from class org.ametys.core.user.population.PopulationContextHelper
__ADMIN_RIGHT_ACCESS, __USER_POPULATIONS_TABLE, _manager, ADMIN_CONTEXT, POPULATION_CONTEXTS_REQUEST_ATTR, ROLE
-
-
Constructor Summary
Constructors Constructor Description PopulationContextHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getUserPopulationsOnContexts(Collection<String> contexts, boolean withDisabled, boolean checkRights)
Gets the populations linked to at least one of the given contexts (need the population to be enabled)-
Methods inherited from class org.ametys.core.user.population.PopulationContextHelper
_getCache, _getCacheAsMap, getCurrentUserProvider, getObservationManager, getRightManager, getSQLConnection, getUserPopulationDAO, getUserPopulationsOnContext, getUserPopulationsOnContexts, initialize, isLinked, link, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
PopulationContextHelper
public PopulationContextHelper()
-
-
Method Detail
-
getUserPopulationsOnContexts
public Set<String> getUserPopulationsOnContexts(Collection<String> contexts, boolean withDisabled, boolean checkRights)
Description copied from class:PopulationContextHelper
Gets the populations linked to at least one of the given contexts (need the population to be enabled)- Overrides:
getUserPopulationsOnContexts
in classPopulationContextHelper
- Parameters:
contexts
- The contextswithDisabled
- True to also return disabled populationscheckRights
- True to check that current user belongs to one of populations or is an administrator user- Returns:
- The ids of populations linked to the contexts
-
-