public class JPAGroupDAO extends AbstractAnyDAO<Group> implements GroupDAO
Modifier and Type | Field and Description |
---|---|
static String |
ADYNMEMB_TABLE |
protected ApplicationEventPublisher |
publisher |
static String |
UDYNMEMB_TABLE |
anyUtilsFactory, derSchemaDAO, dynRealmDAO, plainSchemaDAO
LOG
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
JPAGroupDAO() |
Modifier and Type | Method and Description |
---|---|
void |
clearADynMembers(Group group) |
void |
clearUDynMembers(Group group) |
int |
count() |
int |
countADynMembers(Group group) |
int |
countAMembers(Group group) |
Map<String,Integer> |
countByRealm() |
int |
countUDynMembers(Group group) |
int |
countUMembers(Group group) |
void |
delete(Group group) |
List<String> |
findADynMembers(Group group) |
List<Group> |
findAll(int page,
int itemsPerPage)
Find any objects without any limitation, according to given page and items per page.
|
List<String> |
findAllKeys(int page,
int itemsPerPage)
Find any objects' keys without any limitation, according to given page and items per page.
|
Collection<String> |
findAllResourceKeys(String key) |
List<AMembership> |
findAMemberships(Group group) |
Group |
findByName(String name) |
String |
findKey(String name) |
List<String> |
findKeysByNamePattern(String pattern) |
Date |
findLastChange(String key) |
List<Group> |
findOwnedByGroup(String groupKey) |
List<Group> |
findOwnedByUser(String userKey) |
List<TypeExtension> |
findTypeExtensions(AnyTypeClass anyTypeClass) |
List<String> |
findUDynMembers(Group group) |
List<UMembership> |
findUMemberships(Group group) |
protected AnyUtils |
init() |
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.
|
protected void |
securityChecks(Group group) |
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.
|
anyUtils, authFind, convert, delete, find, findAllKeys, findAllowedSchemas, findByDerAttrValue, findByKeys, findByPlainAttrUniqueValue, findByPlainAttrValue, findByResource, findDynRealms, findKey, findLastChange, getAllMatchingCond, save
clear, detach, entityManager, entityManagerFactory, refresh
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authFind, delete, find, findAllowedSchemas, findByDerAttrValue, findByKeys, findByPlainAttrUniqueValue, findByPlainAttrValue, findByResource, findDynRealms, getAllMatchingCond, save
public static final String UDYNMEMB_TABLE
public static final String ADYNMEMB_TABLE
@Autowired protected ApplicationEventPublisher publisher
protected AnyUtils init()
init
in class AbstractAnyDAO<Group>
@Transactional(readOnly=true) public String findKey(String name)
@Transactional(readOnly=true) public Date findLastChange(String key)
findLastChange
in interface AnyDAO<Group>
public int count()
public Map<String,Integer> countByRealm()
countByRealm
in interface GroupDAO
@Transactional(readOnly=true) public void securityChecks(Set<String> authRealms, String key, String realm)
GroupDAO
securityChecks
in interface GroupDAO
authRealms
- realms for which the calling user owns entitlement(s) to checkkey
- Group keyrealm
- Group's realm full pathprotected void securityChecks(Group group)
securityChecks
in class AbstractAnyDAO<Group>
public Group findByName(String name)
findByName
in interface GroupDAO
public List<String> findKeysByNamePattern(String pattern)
findKeysByNamePattern
in interface GroupDAO
@Transactional(readOnly=true) public List<Group> findOwnedByUser(String userKey)
findOwnedByUser
in interface GroupDAO
@Transactional(readOnly=true) public List<Group> findOwnedByGroup(String groupKey)
findOwnedByGroup
in interface GroupDAO
public List<AMembership> findAMemberships(Group group)
findAMemberships
in interface GroupDAO
public List<UMembership> findUMemberships(Group group)
findUMemberships
in interface GroupDAO
public List<Group> findAll(int page, int itemsPerPage)
AnyDAO
public List<String> findAllKeys(int page, int itemsPerPage)
AnyDAO
findAllKeys
in interface AnyDAO<Group>
page
- search result pageitemsPerPage
- items per search result pagepublic Group saveAndRefreshDynMemberships(Group group)
GroupDAO
saveAndRefreshDynMemberships
in interface GroupDAO
group
- group to savepublic List<TypeExtension> findTypeExtensions(AnyTypeClass anyTypeClass)
findTypeExtensions
in interface GroupDAO
public List<String> findADynMembers(Group group)
findADynMembers
in interface GroupDAO
public int countAMembers(Group group)
countAMembers
in interface GroupDAO
public int countUMembers(Group group)
countUMembers
in interface GroupDAO
public int countADynMembers(Group group)
countADynMembers
in interface GroupDAO
public int countUDynMembers(Group group)
countUDynMembers
in interface GroupDAO
public void clearADynMembers(Group group)
clearADynMembers
in interface GroupDAO
@Transactional public Pair<Set<String>,Set<String>> refreshDynMemberships(AnyObject anyObject)
GroupDAO
refreshDynMemberships
in interface GroupDAO
anyObject
- anyObject being savedpublic Set<String> removeDynMemberships(AnyObject anyObject)
GroupDAO
removeDynMemberships
in interface GroupDAO
anyObject
- anyObject being deletedpublic List<String> findUDynMembers(Group group)
findUDynMembers
in interface GroupDAO
public void clearUDynMembers(Group group)
clearUDynMembers
in interface GroupDAO
@Transactional public Pair<Set<String>,Set<String>> refreshDynMemberships(User user)
GroupDAO
refreshDynMemberships
in interface GroupDAO
user
- user being savedpublic Set<String> removeDynMemberships(User user)
GroupDAO
removeDynMemberships
in interface GroupDAO
user
- user being deleted@Transactional(readOnly=true) public Collection<String> findAllResourceKeys(String key)
findAllResourceKeys
in interface AnyDAO<Group>
findAllResourceKeys
in interface GroupDAO
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.