public class JPAAnyObjectDAO extends AbstractAnyDAO<AnyObject> implements AnyObjectDAO
Modifier and Type | Field and Description |
---|---|
protected GroupDAO |
groupDAO |
protected UserDAO |
userDAO |
anyUtilsFactory, derSchemaDAO, dynRealmDAO, plainSchemaDAO
LOG
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
JPAAnyObjectDAO() |
Modifier and Type | Method and Description |
---|---|
int |
count() |
Map<String,Integer> |
countByRealm(AnyType anyType) |
Map<AnyType,Integer> |
countByType()
Counts the number of instances for each type.
|
void |
delete(AnyObject anyObject) |
protected Pair<AnyObject,Pair<Set<String>,Set<String>>> |
doSave(AnyObject anyObject) |
List<AnyObject> |
findAll(int page,
int itemsPerPage)
Find any objects without any limitation, according to given page and items per page.
|
Collection<String> |
findAllGroupKeys(AnyObject anyObject) |
Collection<Group> |
findAllGroups(AnyObject anyObject) |
List<String> |
findAllKeys(int page,
int itemsPerPage)
Find any objects' keys without any limitation, according to given page and items per page.
|
List<Relationship<Any<?>,AnyObject>> |
findAllRelationships(AnyObject anyObject) |
Collection<String> |
findAllResourceKeys(String key) |
Collection<ExternalResource> |
findAllResources(AnyObject anyObject) |
protected List<ARelationship> |
findARelationships(AnyObject anyObject) |
AnyObject |
findByName(String name) |
List<Group> |
findDynGroups(String key) |
String |
findKey(String name) |
Date |
findLastChange(String key) |
AMembership |
findMembership(String key) |
protected List<URelationship> |
findURelationships(AnyObject anyObject) |
protected AnyUtils |
init() |
AnyObject |
save(AnyObject anyObject) |
Pair<Set<String>,Set<String>> |
saveAndGetDynGroupMembs(AnyObject anyObject) |
protected void |
securityChecks(AnyObject anyObject) |
void |
securityChecks(Set<String> authRealms,
String key,
String realm,
Collection<String> groups)
Checks if the calling user is authorized to access the Any Object matching the provided key, under the given
realm.
|
anyUtils, authFind, convert, delete, find, findAllKeys, findAllowedSchemas, findByDerAttrValue, findByKeys, findByPlainAttrUniqueValue, findByPlainAttrValue, findByResource, findDynRealms, findKey, findLastChange, getAllMatchingCond
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
@Autowired protected UserDAO userDAO
@Autowired protected GroupDAO groupDAO
protected AnyUtils init()
init
in class AbstractAnyDAO<AnyObject>
@Transactional(readOnly=true) public String findKey(String name)
@Transactional(readOnly=true) public Date findLastChange(String key)
findLastChange
in interface AnyDAO<AnyObject>
public Map<AnyType,Integer> countByType()
AnyObjectDAO
countByType
in interface AnyObjectDAO
public Map<String,Integer> countByRealm(AnyType anyType)
countByRealm
in interface AnyObjectDAO
@Transactional(readOnly=true) public void securityChecks(Set<String> authRealms, String key, String realm, Collection<String> groups)
AnyObjectDAO
securityChecks
in interface AnyObjectDAO
authRealms
- realms for which the calling user owns entitlement(s) to checkkey
- Any Object keyrealm
- Any Object's realm full pathgroups
- group the Any Object is member ofprotected void securityChecks(AnyObject anyObject)
securityChecks
in class AbstractAnyDAO<AnyObject>
public AnyObject findByName(String name)
findByName
in interface AnyObjectDAO
public AMembership findMembership(String key)
findMembership
in interface AnyObjectDAO
public List<Relationship<Any<?>,AnyObject>> findAllRelationships(AnyObject anyObject)
findAllRelationships
in interface AnyObjectDAO
public int count()
public List<AnyObject> findAll(int page, int itemsPerPage)
AnyDAO
public List<String> findAllKeys(int page, int itemsPerPage)
AnyDAO
findAllKeys
in interface AnyDAO<AnyObject>
page
- search result pageitemsPerPage
- items per search result pagepublic Pair<Set<String>,Set<String>> saveAndGetDynGroupMembs(AnyObject anyObject)
saveAndGetDynGroupMembs
in interface AnyObjectDAO
protected List<ARelationship> findARelationships(AnyObject anyObject)
protected List<URelationship> findURelationships(AnyObject anyObject)
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public List<Group> findDynGroups(String key)
findDynGroups
in interface AnyObjectDAO
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public Collection<Group> findAllGroups(AnyObject anyObject)
findAllGroups
in interface AnyObjectDAO
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public Collection<String> findAllGroupKeys(AnyObject anyObject)
findAllGroupKeys
in interface AnyObjectDAO
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public Collection<ExternalResource> findAllResources(AnyObject anyObject)
findAllResources
in interface AnyObjectDAO
@Transactional(readOnly=true) public Collection<String> findAllResourceKeys(String key)
findAllResourceKeys
in interface AnyDAO<AnyObject>
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.