Interface GroupDAO
-
- All Known Implementing Classes:
JPAGroupDAO
,JPAJSONGroupDAO
public interface GroupDAO extends AnyDAO<Group>
-
-
Field Summary
-
Fields inherited from interface org.apache.syncope.core.persistence.api.dao.AnyDAO
DEFAULT_PAGE_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearADynMembers(Group group)
void
clearUDynMembers(Group group)
int
countADynMembers(Group group)
int
countAMembers(String groupKey)
Map<String,Integer>
countByRealm()
int
countUDynMembers(Group group)
int
countUMembers(String groupKey)
boolean
existsAMembership(String anyObjectKey, String groupKey)
boolean
existsUMembership(String userKey, String groupKey)
List<String>
findADynMembers(Group group)
Collection<String>
findAllResourceKeys(String key)
List<String>
findAMembers(String groupKey)
List<AMembership>
findAMemberships(Group group)
Group
findByName(String name)
String
findKey(String name)
List<String>
findKeysByNamePattern(String pattern)
List<Group>
findOwnedByGroup(String groupKey)
List<Group>
findOwnedByUser(String userKey)
List<TypeExtension>
findTypeExtensions(AnyTypeClass anyTypeClass)
List<String>
findUDynMembers(Group group)
List<String>
findUMembers(String groupKey)
List<UMembership>
findUMemberships(Group group)
Pair<Set<String>,Set<String>>
refreshDynMemberships(AnyObject anyObject)
Evaluates all the dynamic group membership conditions against the given anyObject (invoked during save).Pair<Set<String>,Set<String>>
refreshDynMemberships(User user)
Evaluates all the dynamic group membership conditions against the given user (invoked during save).Set<String>
removeDynMemberships(AnyObject anyObject)
Removes the dynamic group memberships of the given anyObject (invoked during delete).Set<String>
removeDynMemberships(User user)
Removes the dynamic group memberships of the given anyObject (invoked during delete).Group
saveAndRefreshDynMemberships(Group group)
Saves the provided group and refreshes all User and AnyObject members.void
securityChecks(Set<String> authRealms, String key, String realm)
Checks if the calling user is authorized to access the Group matching the provided key, under the given realm.-
Methods inherited from interface org.apache.syncope.core.persistence.api.dao.AnyDAO
authFind, count, delete, delete, find, findAll, findAllKeys, findAllowedSchemas, findByDerAttrValue, findByKeys, findByPlainAttrUniqueValue, findByPlainAttrValue, findByResource, findDynRealms, findLastChange, getAllMatchingCond, save
-
-
-
-
Method Detail
-
securityChecks
void securityChecks(Set<String> authRealms, String key, String realm)
Checks if the calling user is authorized to access the Group matching the provided key, under the given realm.- Parameters:
authRealms
- realms for which the calling user owns entitlement(s) to checkkey
- Group keyrealm
- Group's realm full path
-
findAMemberships
List<AMembership> findAMemberships(Group group)
-
findUMemberships
List<UMembership> findUMemberships(Group group)
-
findTypeExtensions
List<TypeExtension> findTypeExtensions(AnyTypeClass anyTypeClass)
-
countAMembers
int countAMembers(String groupKey)
-
countUMembers
int countUMembers(String groupKey)
-
countADynMembers
int countADynMembers(Group group)
-
countUDynMembers
int countUDynMembers(Group group)
-
findAllResourceKeys
Collection<String> findAllResourceKeys(String key)
- Specified by:
findAllResourceKeys
in interfaceAnyDAO<Group>
-
clearADynMembers
void clearADynMembers(Group group)
-
refreshDynMemberships
Pair<Set<String>,Set<String>> refreshDynMemberships(AnyObject anyObject)
Evaluates all the dynamic group membership conditions against the given anyObject (invoked during save).- Parameters:
anyObject
- anyObject being saved- Returns:
- pair of groups dynamically assigned before and after refresh
-
removeDynMemberships
Set<String> removeDynMemberships(AnyObject anyObject)
Removes the dynamic group memberships of the given anyObject (invoked during delete).- Parameters:
anyObject
- anyObject being deleted- Returns:
- groups dynamically assigned before refresh
-
clearUDynMembers
void clearUDynMembers(Group group)
-
refreshDynMemberships
Pair<Set<String>,Set<String>> refreshDynMemberships(User user)
Evaluates all the dynamic group membership conditions against the given user (invoked during save).- Parameters:
user
- user being saved- Returns:
- pair of groups dynamically assigned before and after refresh
-
removeDynMemberships
Set<String> removeDynMemberships(User user)
Removes the dynamic group memberships of the given anyObject (invoked during delete).- Parameters:
user
- user being deleted- Returns:
- groups dynamically assigned before refresh
-
-