public class PopulationContextHelper extends PopulationContextHelper
UserPopulation
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')Modifier and Type | Field and Description |
---|---|
private static Pattern |
_SITES_CONTEXT_PATTERN |
private static String |
_SITES_CONTEXT_PREFIX |
private static Pattern |
_SITES_FO_CONTEXT_PATTERN |
private static String |
_SITES_FO_CONTEXT_PREFIX |
__ADMIN_RIGHT_ACCESS, __USER_POPULATIONS_TABLE, _manager, ADMIN_CONTEXT, POPULATION_CONTEXTS_REQUEST_ATTR, ROLE
Constructor and Description |
---|
PopulationContextHelper() |
Modifier and Type | Method and 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)
|
getCurrentUserProvider, getObservationManager, getRightManager, getSQLConnection, getUserPopulationDAO, getUserPopulationsOnContext, getUserPopulationsOnContexts, isLinked, link, service
getLogger, setLogger
private static final Pattern _SITES_CONTEXT_PATTERN
private static final Pattern _SITES_FO_CONTEXT_PATTERN
private static final String _SITES_CONTEXT_PREFIX
private static final String _SITES_FO_CONTEXT_PREFIX
public PopulationContextHelper()
public Set<String> getUserPopulationsOnContexts(Collection<String> contexts, boolean withDisabled, boolean checkRights)
PopulationContextHelper
getUserPopulationsOnContexts
in class PopulationContextHelper
contexts
- The contextswithDisabled
- True to also return disabled populationscheckRights
- True to check that current user belongs to one of populations or is an administrator userprivate String _getSiteComplementaryContext(String context)