public abstract class AbstractAclCrudDAOImpl extends Object implements AclCrudDAO
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations for: alf_access_control_list alf_acl_member alf_acl_change_set alf_access_control_entry alf_permission alf_authority Also, following are currently unused: alf_ace_context alf_authority_alias
Constructor and Description |
---|
AbstractAclCrudDAOImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAclMembersToAcl(long aclId,
List<Long> aceIds,
int depth) |
void |
addAclMembersToAcl(long aclId,
List<org.alfresco.util.Pair<Long,Integer>> aceIdsWithDepths) |
Ace |
createAce(Permission permission,
Authority authority,
ACEType type,
org.alfresco.service.cmr.security.AccessStatus accessStatus) |
protected abstract long |
createAceContextEntity(AceContextEntity entity) |
protected abstract long |
createAceEntity(AceEntity entity) |
AclEntity |
createAcl(AclEntity entity) |
Long |
createAclChangeSet() |
protected abstract Long |
createAclChangeSetEntity() |
protected abstract AclEntity |
createAclEntity(AclEntity entity) |
protected abstract AclMemberEntity |
createAclMemberEntity(AclMemberEntity entity) |
Authority |
createAuthority(String authorityName) |
protected abstract long |
createAuthorityAliasEntity(AuthorityAliasEntity entity) |
protected abstract AuthorityEntity |
createAuthorityEntity(AuthorityEntity entity) |
Permission |
createPermission(PermissionReference permissionReference) |
protected abstract PermissionEntity |
createPermissionEntity(PermissionEntity entity) |
protected abstract int |
deleteAceContextEntity(long aceContextId) |
protected abstract int |
deleteAceEntities(List<Long> aceIds) |
int |
deleteAces(List<Long> aceIds) |
void |
deleteAcl(long id) |
void |
deleteAclChangeSet(Long changeSetId) |
protected abstract int |
deleteAclChangeSetEntity(Long id) |
protected abstract int |
deleteAclEntity(long id) |
protected abstract int |
deleteAclMemberEntities(List<Long> aclMemberIds) |
protected abstract int |
deleteAclMemberEntitiesByAcl(long idOfAcl) |
int |
deleteAclMembers(List<Long> aclMemberIds) |
int |
deleteAclMembersByAcl(long idOfAcl) |
void |
deleteAuthority(long id) |
protected abstract int |
deleteAuthorityAliasEntity(long id) |
protected abstract int |
deleteAuthorityEntity(long id) |
void |
deletePermission(long id) |
protected abstract int |
deletePermissionEntity(long id) |
Ace |
getAce(long aceEntityId) |
Ace |
getAce(Permission permission,
Authority authority,
ACEType type,
org.alfresco.service.cmr.security.AccessStatus accessStatus) |
protected abstract List<Map<String,Object>> |
getAceAndAuthorityEntitiesByAcl(long idOfAcl) |
protected abstract AceContextEntity |
getAceContextEntity(long aceContextId) |
protected abstract List<Ace> |
getAceEntitiesByAuthority(long authorityId) |
protected abstract AceEntity |
getAceEntity(long aceEntityId) |
protected abstract AceEntity |
getAceEntity(long permissionId,
long authorityId,
boolean allowed,
ACEType type) |
List<Map<String,Object>> |
getAcesAndAuthoritiesByAcl(long idOfAcl) |
List<Ace> |
getAcesByAuthority(long authorityId) |
Acl |
getAcl(Long id) |
AclChangeSetEntity |
getAclChangeSet(Long changeSetId) |
protected abstract AclChangeSetEntity |
getAclChangeSetEntity(Long changeSetId) |
protected abstract List<Long> |
getAclEntitiesThatInheritFromAcl(long idOfAcl) |
protected abstract AclEntity |
getAclEntity(long id) |
AclUpdateEntity |
getAclForUpdate(long id) |
protected abstract List<AclMemberEntity> |
getAclMemberEntitiesByAcl(long idOfAcl) |
protected abstract List<AclMemberEntity> |
getAclMemberEntitiesByAuthority(String authorityName) |
protected abstract AclMemberEntity |
getAclMemberEntity(long aclId,
long aceId,
int pos) |
List<AclMember> |
getAclMembersByAcl(long idOfAcl) |
List<AclMemberEntity> |
getAclMembersByAclForUpdate(long idOfAcl) |
List<AclMember> |
getAclMembersByAuthority(String authorityName) |
List<Long> |
getAclsThatInheritFromAcl(long aclEntityId) |
protected abstract List<Long> |
getADMNodeEntityIdsByAcl(long aclEntityId,
int maxResults) |
List<Long> |
getADMNodesByAcl(long aclEntityId,
int maxResults) |
Authority |
getAuthority(long id) |
Authority |
getAuthority(String authorityName) |
protected abstract AuthorityEntity |
getAuthorityEntity(long id) |
protected abstract AuthorityEntity |
getAuthorityEntity(String authorityName) |
Long |
getLatestAclByGuid(String aclGuid) |
protected abstract Long |
getLatestAclEntityByGuid(String aclGuid) |
Long |
getMaxChangeSetCommitTime() |
Long |
getMaxChangeSetIdByCommitTime(long maxCommitTime) |
Ace |
getOrCreateAce(Permission permission,
Authority authority,
ACEType type,
org.alfresco.service.cmr.security.AccessStatus accessStatus) |
Authority |
getOrCreateAuthority(String name) |
Permission |
getOrCreatePermission(PermissionReference permissionReference) |
Permission |
getPermission(long id) |
Permission |
getPermission(PermissionReference permissionReference) |
protected abstract PermissionEntity |
getPermissionEntity(long id) |
protected abstract PermissionEntity |
getPermissionEntity(long qnameId,
String name) |
void |
renameAuthority(String before,
String after) |
void |
renamePermission(org.alfresco.service.namespace.QName oldTypeQName,
String oldName,
org.alfresco.service.namespace.QName newTypeQName,
String newName) |
protected abstract Long |
selectMaxChangeSetCommitTime() |
protected abstract Long |
selectMaxChangeSetIdBeforeCommitTime(long maxCommitTime) |
void |
setAclEntityCache(TransactionalCache<Serializable,Object> aclEntityCache)
Set the cache to use for alf_access_control_list lookups (optional).
|
void |
setAuthorityEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Object> authorityEntityCache)
Set the cache to use for alf_authority lookups (optional).
|
void |
setBatchSize(int batchSizeOverride) |
void |
setCheckAclConsistency()
Transaction-scope setting to make the DAO guarantee the validity of all caches: some cache data will be reloaded;
some cache data will be considered safe.
|
void |
setPermissionEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Object> permissionEntityCache)
Set the cache to use for alf_permission lookups (optional).
|
void |
setQnameDAO(QNameDAO qnameDAO) |
protected abstract int |
updateAceEntity(AceEntity updatedAceEntity) |
void |
updateAcl(AclUpdateEntity entity) |
void |
updateAclChangeSet(Long aclChangeSetEntityId,
long commitTimeMs) |
protected abstract int |
updateAclEntity(AclEntity entity) |
void |
updateAclMember(AclMemberEntity entity) |
protected abstract int |
updateAclMemberEntity(AclMemberEntity entity) |
protected abstract int |
updateAuthorityEntity(AuthorityEntity updateEntity) |
protected abstract int |
updateChangeSetEntity(Long id,
long commitTimeMs) |
protected abstract int |
updatePermissionEntity(PermissionEntity updateEntity) |
public AbstractAclCrudDAOImpl()
This sets up the DAO accessors to bypass any caching to handle the case where the caches are not supplied in the setters.
public void setQnameDAO(QNameDAO qnameDAO)
public void setBatchSize(int batchSizeOverride)
public void setAclEntityCache(TransactionalCache<Serializable,Object> aclEntityCache)
aclEntityCache
- the cache of IDs to AclEntitiespublic void setAuthorityEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Object> authorityEntityCache)
authorityEntityCache
- the cache of IDs to AclEntitiespublic void setPermissionEntityCache(org.alfresco.repo.cache.SimpleCache<Serializable,Object> permissionEntityCache)
permissionEntityCache
- the cache of IDs to PermissionEntitiespublic AclEntity createAcl(AclEntity entity)
createAcl
in interface AclCrudDAO
public Acl getAcl(Long id)
getAcl
in interface AclCrudDAO
public void setCheckAclConsistency()
AclCrudDAO
setCheckAclConsistency
in interface AclCrudDAO
public AclUpdateEntity getAclForUpdate(long id)
getAclForUpdate
in interface AclCrudDAO
public List<Long> getAclsThatInheritFromAcl(long aclEntityId)
getAclsThatInheritFromAcl
in interface AclCrudDAO
public Long getLatestAclByGuid(String aclGuid)
getLatestAclByGuid
in interface AclCrudDAO
public List<Long> getADMNodesByAcl(long aclEntityId, int maxResults)
getADMNodesByAcl
in interface AclCrudDAO
public void updateAcl(AclUpdateEntity entity)
updateAcl
in interface AclCrudDAO
public void deleteAcl(long id)
deleteAcl
in interface AclCrudDAO
protected abstract AclEntity getAclEntity(long id)
protected abstract List<Long> getAclEntitiesThatInheritFromAcl(long idOfAcl)
protected abstract int updateAclEntity(AclEntity entity)
protected abstract int updateAceEntity(AceEntity updatedAceEntity)
protected abstract int deleteAclEntity(long id)
protected abstract List<Long> getADMNodeEntityIdsByAcl(long aclEntityId, int maxResults)
public void addAclMembersToAcl(long aclId, List<Long> aceIds, int depth)
addAclMembersToAcl
in interface AclCrudDAO
public void addAclMembersToAcl(long aclId, List<org.alfresco.util.Pair<Long,Integer>> aceIdsWithDepths)
addAclMembersToAcl
in interface AclCrudDAO
public List<AclMember> getAclMembersByAcl(long idOfAcl)
getAclMembersByAcl
in interface AclCrudDAO
public List<AclMemberEntity> getAclMembersByAclForUpdate(long idOfAcl)
getAclMembersByAclForUpdate
in interface AclCrudDAO
public List<AclMember> getAclMembersByAuthority(String authorityName)
getAclMembersByAuthority
in interface AclCrudDAO
public void updateAclMember(AclMemberEntity entity)
updateAclMember
in interface AclCrudDAO
public int deleteAclMembers(List<Long> aclMemberIds)
deleteAclMembers
in interface AclCrudDAO
public int deleteAclMembersByAcl(long idOfAcl)
deleteAclMembersByAcl
in interface AclCrudDAO
protected abstract AclMemberEntity createAclMemberEntity(AclMemberEntity entity)
protected abstract List<AclMemberEntity> getAclMemberEntitiesByAcl(long idOfAcl)
protected abstract List<AclMemberEntity> getAclMemberEntitiesByAuthority(String authorityName)
protected abstract int updateAclMemberEntity(AclMemberEntity entity)
protected abstract int deleteAclMemberEntitiesByAcl(long idOfAcl)
protected abstract AclMemberEntity getAclMemberEntity(long aclId, long aceId, int pos)
public Long createAclChangeSet()
createAclChangeSet
in interface AclCrudDAO
public void updateAclChangeSet(Long aclChangeSetEntityId, long commitTimeMs)
updateAclChangeSet
in interface AclCrudDAO
public AclChangeSetEntity getAclChangeSet(Long changeSetId)
getAclChangeSet
in interface AclCrudDAO
public void deleteAclChangeSet(Long changeSetId)
deleteAclChangeSet
in interface AclCrudDAO
protected abstract Long createAclChangeSetEntity()
protected abstract AclChangeSetEntity getAclChangeSetEntity(Long changeSetId)
protected abstract int deleteAclChangeSetEntity(Long id)
protected abstract int updateChangeSetEntity(Long id, long commitTimeMs)
public Ace createAce(Permission permission, Authority authority, ACEType type, org.alfresco.service.cmr.security.AccessStatus accessStatus)
createAce
in interface AclCrudDAO
public Ace getAce(Permission permission, Authority authority, ACEType type, org.alfresco.service.cmr.security.AccessStatus accessStatus)
getAce
in interface AclCrudDAO
public Ace getAce(long aceEntityId)
getAce
in interface AclCrudDAO
public Ace getOrCreateAce(Permission permission, Authority authority, ACEType type, org.alfresco.service.cmr.security.AccessStatus accessStatus)
getOrCreateAce
in interface AclCrudDAO
public List<Ace> getAcesByAuthority(long authorityId)
getAcesByAuthority
in interface AclCrudDAO
public List<Map<String,Object>> getAcesAndAuthoritiesByAcl(long idOfAcl)
getAcesAndAuthoritiesByAcl
in interface AclCrudDAO
public int deleteAces(List<Long> aceIds)
deleteAces
in interface AclCrudDAO
protected abstract long createAceEntity(AceEntity entity)
protected abstract AceEntity getAceEntity(long aceEntityId)
protected abstract AceEntity getAceEntity(long permissionId, long authorityId, boolean allowed, ACEType type)
protected abstract List<Map<String,Object>> getAceAndAuthorityEntitiesByAcl(long idOfAcl)
public Permission createPermission(PermissionReference permissionReference)
createPermission
in interface AclCrudDAO
public Permission getPermission(long id)
getPermission
in interface AclCrudDAO
public Permission getPermission(PermissionReference permissionReference)
getPermission
in interface AclCrudDAO
public Permission getOrCreatePermission(PermissionReference permissionReference)
getOrCreatePermission
in interface AclCrudDAO
public void renamePermission(org.alfresco.service.namespace.QName oldTypeQName, String oldName, org.alfresco.service.namespace.QName newTypeQName, String newName)
renamePermission
in interface AclCrudDAO
public void deletePermission(long id)
deletePermission
in interface AclCrudDAO
protected abstract PermissionEntity createPermissionEntity(PermissionEntity entity)
protected abstract PermissionEntity getPermissionEntity(long id)
protected abstract PermissionEntity getPermissionEntity(long qnameId, String name)
protected abstract int updatePermissionEntity(PermissionEntity updateEntity)
protected abstract int deletePermissionEntity(long id)
public Authority getAuthority(long id)
getAuthority
in interface AclCrudDAO
public Authority getAuthority(String authorityName)
getAuthority
in interface AclCrudDAO
public Authority getOrCreateAuthority(String name)
getOrCreateAuthority
in interface AclCrudDAO
public void renameAuthority(String before, String after)
renameAuthority
in interface AclCrudDAO
public void deleteAuthority(long id)
deleteAuthority
in interface AclCrudDAO
protected abstract AuthorityEntity createAuthorityEntity(AuthorityEntity entity)
protected abstract AuthorityEntity getAuthorityEntity(long id)
protected abstract AuthorityEntity getAuthorityEntity(String authorityName)
protected abstract int updateAuthorityEntity(AuthorityEntity updateEntity)
protected abstract int deleteAuthorityEntity(long id)
protected abstract long createAceContextEntity(AceContextEntity entity)
protected abstract AceContextEntity getAceContextEntity(long aceContextId)
protected abstract int deleteAceContextEntity(long aceContextId)
protected abstract long createAuthorityAliasEntity(AuthorityAliasEntity entity)
protected abstract int deleteAuthorityAliasEntity(long id)
public Long getMaxChangeSetCommitTime()
getMaxChangeSetCommitTime
in interface AclCrudDAO
protected abstract Long selectMaxChangeSetCommitTime()
public Long getMaxChangeSetIdByCommitTime(long maxCommitTime)
getMaxChangeSetIdByCommitTime
in interface AclCrudDAO
maxCommitTime
- longprotected abstract Long selectMaxChangeSetIdBeforeCommitTime(long maxCommitTime)
maxCommitTime
- longCopyright © 2005–2017 Alfresco Software. All rights reserved.