public class JahiaGroupManagerService extends JahiaService
| Modifier and Type | Field and Description |
|---|---|
static String |
ADMINISTRATORS_GROUPNAME |
static String |
GUEST_GROUPNAME |
static String |
GUEST_GROUPPATH |
static Set<String> |
POWERFUL_GROUPS |
static String |
PRIVILEGED_GROUPNAME |
static Set<String> |
PROTECTED_GROUPS |
static String |
SITE_ADMINISTRATORS_GROUPNAME |
static String |
SITE_PRIVILEGED_GROUPNAME |
static String |
SITE_USERS_GROUPNAME |
static String |
USERS_GROUPNAME |
static String |
USERS_GROUPPATH |
settingsBean| Constructor and Description |
|---|
JahiaGroupManagerService() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNonExistingGroupsCache()
Remove all cache entries for non existing groups
|
JCRGroupNode |
createGroup(String siteKey,
String name,
Properties properties,
boolean hidden,
JCRSessionWrapper session)
Create a new group in the system.
|
boolean |
deleteGroup(String groupPath,
JCRSessionWrapper session)
Delete a group from the system.
|
void |
flushMembershipCache(String memberPath,
JCRSessionWrapper session) |
JCRGroupNode |
getAdministratorGroup(String siteKey)
Get administrator or site administrator group
|
JCRGroupNode |
getAdministratorGroup(String siteKey,
JCRSessionWrapper session)
Get administrator or site administrator group
|
List<String> |
getGroupList()
Return a
ListString representing all the
group keys in the system. |
List<String> |
getGroupList(String siteKey)
Return a
ListString representing all the
group keys of a site. |
List<String> |
getGroupnameList()
Return a
ListString representing all the
group names. |
String |
getGroupPath(String siteKey,
String name) |
static JahiaGroupManagerService |
getInstance() |
List<String> |
getMembershipByPath(String principalPath)
Return the list of groups to which the specified user has access.
|
JahiaGroupManagerProvider |
getProvider(String key)
Deprecated.
|
JCRStoreProvider |
getProvider(String siteKey,
String providerKey,
JCRSessionWrapper session)
Retrieve the group provider corresponding to a given key
|
List<? extends JahiaGroupManagerProvider> |
getProviderList()
Deprecated.
|
List<JCRStoreProvider> |
getProviderList(String siteKey,
JCRSessionWrapper session)
Provide the list of all available groups providers
|
List<JCRStoreProvider> |
getProviders(String siteKey,
String[] providerKeys,
JCRSessionWrapper session)
Provide the list of groups providers matching given keys
|
List<String> |
getUserMembership(String userName,
String site) |
boolean |
groupExists(String siteKey,
String name)
This function checks on a gived site if the group name has already been
assigned to another group.
|
boolean |
isAdminMember(String username,
String siteKey) |
boolean |
isAdminMember(String username,
String userSite,
String siteKey) |
boolean |
isGroupNameSyntaxCorrect(String name)
Validates provided group name against a regular expression pattern, specified in the Jahia configuration.
|
boolean |
isMember(String username,
String groupname,
String groupSite) |
boolean |
isMember(String username,
String userSite,
String groupname,
String groupSite) |
JCRGroupNode |
lookupGroup(String groupPath)
Deprecated.
use lookupGroupByPath() instead
|
JCRGroupNode |
lookupGroup(String siteKey,
String name)
Lookup the group information from the underlaying system (DB, LDAP, ...
|
JCRGroupNode |
lookupGroup(String siteKey,
String name,
JCRSessionWrapper session)
Lookup the group information from the underlaying system (DB, LDAP, ...
|
JCRGroupNode |
lookupGroupByPath(String groupPath)
Lookup the group information from the underlying system (DB, LDAP, ...
|
JCRGroupNode |
lookupGroupByPath(String groupPath,
JCRSessionWrapper session)
Lookup the group information from the underlaying system (DB, LDAP, ...
|
void |
registerProvider(JahiaGroupManagerProvider jahiaGroupManagerProvider)
Deprecated.
|
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias)
Find groups according to a table of name=value properties.
|
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias,
JCRSessionWrapper session)
Find groups according to a table of name=value properties.
|
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias,
String[] providers)
Find groups according to a table of name=value properties.
|
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias,
String[] providers,
boolean excludeProtected,
JCRSessionWrapper session) |
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias,
String[] providers,
JCRSessionWrapper session)
Find groups according to a table of name=value properties.
|
Set<JCRGroupNode> |
searchGroups(String siteKey,
Properties searchCriterias,
String providerKey,
boolean excludeProtected,
JCRSessionWrapper session) |
void |
setCacheHelper(GroupCacheHelper cacheHelper) |
void |
setUserManagerService(JahiaUserManagerService userManagerService) |
void |
start() |
void |
stop() |
void |
unregisterProvider(JahiaGroupManagerProvider jahiaGroupManagerProvider)
Deprecated.
|
void |
updatePathCacheAdded(String groupPath) |
void |
updatePathCacheRemoved(String groupPath) |
getSettingsBean, setSettingsBeanpublic static final String USERS_GROUPNAME
public static final String SITE_USERS_GROUPNAME
public static final String ADMINISTRATORS_GROUPNAME
public static final String PRIVILEGED_GROUPNAME
public static final String SITE_PRIVILEGED_GROUPNAME
public static final String SITE_ADMINISTRATORS_GROUPNAME
public static final String GUEST_GROUPNAME
public static final String GUEST_GROUPPATH
public static final String USERS_GROUPPATH
public static JahiaGroupManagerService getInstance()
public void setUserManagerService(JahiaUserManagerService userManagerService)
public void start()
throws JahiaInitializationException
start in class JahiaServiceJahiaInitializationExceptionpublic void stop()
throws JahiaException
stop in class JahiaServiceJahiaExceptionpublic JCRGroupNode lookupGroup(String groupPath)
public JCRGroupNode lookupGroupByPath(String groupPath)
groupPath - Group's pathpublic JCRGroupNode lookupGroupByPath(String groupPath, JCRSessionWrapper session)
groupPath - Group's pathpublic JCRGroupNode lookupGroup(String siteKey, String name)
siteKey - siteKey the site idname - Group's unique identification name.public JCRGroupNode lookupGroup(String siteKey, String name, JCRSessionWrapper session)
siteKey - siteKey the site idname - Group's unique identification name.public boolean groupExists(String siteKey, String name)
siteKey - siteKey the site keyname - String representing the unique group name.public JCRGroupNode getAdministratorGroup(String siteKey) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic JCRGroupNode getAdministratorGroup(String siteKey, JCRSessionWrapper session) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic List<String> getGroupList()
ListString representing all the
group keys in the system.public List<String> getGroupList(String siteKey)
ListString representing all the
group keys of a site.siteKey - the key of the site from which you wish to retrieve the list of grouppublic List<String> getGroupnameList()
ListString representing all the
group names.public Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias)
siteKey - site identifiersearchCriterias - a Properties object that contains search criterias
in the format name,value (for example "*"="*" or "groupname"="*test*") or
null to search without criteriaspublic Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias, String[] providers)
siteKey - site identifiersearchCriterias - a Properties object that contains search criterias
in the format name,value (for example "*"="*" or "groupname"="*test*") or
null to search without criteriasproviders - the providers key to search onpublic Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias, JCRSessionWrapper session)
siteKey - site identifiersearchCriterias - a Properties object that contains search criterias
in the format name,value (for example "*"="*" or "groupname"="*test*") or
null to search without criteriaspublic Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias, String[] providers, JCRSessionWrapper session)
siteKey - site identifiersearchCriterias - a Properties object that contains search criterias
in the format name,value (for example "*"="*" or "groupname"="*test*") or
null to search without criteriasproviders - the providers key to search onpublic Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias, String[] providers, boolean excludeProtected, JCRSessionWrapper session)
public Set<JCRGroupNode> searchGroups(String siteKey, Properties searchCriterias, String providerKey, boolean excludeProtected, JCRSessionWrapper session)
public List<JCRStoreProvider> getProviderList(String siteKey, JCRSessionWrapper session)
siteKey - the site to lookup on, if provided lookup under /sites/{siteKey}/groups/providers else the lookup is made under /groups/providers)session - the session usedpublic List<JCRStoreProvider> getProviders(String siteKey, String[] providerKeys, JCRSessionWrapper session)
siteKey - the site to lookup on, if provided lookup under /sites/{siteKey}/groups/providers else the lookup is made under /groups/providers)providerKeys - the keyssession - the session usedpublic JCRStoreProvider getProvider(String siteKey, String providerKey, JCRSessionWrapper session)
siteKey - the site to lookup on, if provided lookup under /sites/{siteKey}/groups/providers else the lookup is made under /groups/providers)providerKey - the keysession - the session usedpublic boolean isMember(String username, String userSite, String groupname, String groupSite)
public JCRGroupNode createGroup(String siteKey, String name, Properties properties, boolean hidden, JCRSessionWrapper session)
hidden - public boolean deleteGroup(String groupPath, JCRSessionWrapper session)
groupPath - Path of the group to deletepublic boolean isGroupNameSyntaxCorrect(String name)
name - the group name to be validatedtrue if the specified group name matches the validation patternpublic void flushMembershipCache(String memberPath, JCRSessionWrapper session)
public void updatePathCacheAdded(String groupPath)
public void updatePathCacheRemoved(String groupPath)
@Deprecated public List<? extends JahiaGroupManagerProvider> getProviderList()
@Deprecated public JahiaGroupManagerProvider getProvider(String key)
@Deprecated public void registerProvider(JahiaGroupManagerProvider jahiaGroupManagerProvider)
@Deprecated public void unregisterProvider(JahiaGroupManagerProvider jahiaGroupManagerProvider)
public void setCacheHelper(GroupCacheHelper cacheHelper)
public void clearNonExistingGroupsCache()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.