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 associatingUserPopulations 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 Modifier and Type Field Description private static Pattern_SITES_CONTEXT_PATTERNprivate static String_SITES_CONTEXT_PREFIXprivate static Pattern_SITES_FO_CONTEXT_PATTERNprivate static String_SITES_FO_CONTEXT_PREFIX- 
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 private String_getSiteComplementaryContext(String context)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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_SITES_CONTEXT_PATTERN
private static final Pattern _SITES_CONTEXT_PATTERN
 
- 
_SITES_FO_CONTEXT_PATTERN
private static final Pattern _SITES_FO_CONTEXT_PATTERN
 
- 
_SITES_CONTEXT_PREFIX
private static final String _SITES_CONTEXT_PREFIX
- See Also:
 - Constant Field Values
 
 
- 
_SITES_FO_CONTEXT_PREFIX
private static final String _SITES_FO_CONTEXT_PREFIX
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
PopulationContextHelper
public PopulationContextHelper()
 
 - 
 
- 
Method Detail
- 
getUserPopulationsOnContexts
public Set<String> getUserPopulationsOnContexts(Collection<String> contexts, boolean withDisabled, boolean checkRights)
Description copied from class:PopulationContextHelperGets the populations linked to at least one of the given contexts (need the population to be enabled)- Overrides:
 getUserPopulationsOnContextsin 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
 
 
- 
_getSiteComplementaryContext
private String _getSiteComplementaryContext(String context)
 
 - 
 
 -