Class HibernateMutableAclServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.security.acegi.acls.HibernateMutableAclServiceImpl
-
- All Implemented Interfaces:
HibernateMutableAclService
,org.acegisecurity.acls.AclService
,org.acegisecurity.acls.MutableAclService
public class HibernateMutableAclServiceImpl extends Object implements HibernateMutableAclService
-
-
Field Summary
Fields Modifier and Type Field Description static String
BAMBOO_PERMISSION_FORM_GROUP
static String
BAMBOO_PERMISSION_FORM_GROUP_PREFIX
static String
BAMBOO_PERMISSION_FORM_ROLE
static String
BAMBOO_PERMISSION_FORM_ROLE_PREFIX
static String
BAMBOO_PERMISSION_FORM_SEPARATOR
static String
BAMBOO_PERMISSION_FORM_USER
static String
BAMBOO_PERMISSION_FORM_USER_PREFIX
-
Constructor Summary
Constructors Constructor Description HibernateMutableAclServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeAlcOwnerForSid(org.acegisecurity.acls.sid.Sid oldOwner, org.acegisecurity.acls.sid.Sid newOwner)
Change the ownership of all Acls owned byoldOwner
tonewOwner
.org.acegisecurity.acls.MutableAcl
createAcl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity)
void
deleteAcesForSid(org.acegisecurity.acls.sid.Sid sid)
Deleted all access control entries associated with a given security identity.void
deleteAcl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, boolean deleteChildren)
void
deleteAllAcls()
Deletes all ACLs and permissions from the system...org.acegisecurity.acls.objectidentity.ObjectIdentity[]
findChildren(org.acegisecurity.acls.objectidentity.ObjectIdentity parentIdentity)
org.acegisecurity.acls.MutableAcl
getAclOfGlobalPermission()
Read acl for the global permission objectBambooCacheStats
getCacheStats()
boolean
hasAcesForSid(org.acegisecurity.acls.sid.Sid sid)
Check if givenSid
has anyAccessControlEntry
s.void
initialiseCache()
Warm up the cache.void
invalidateCache()
org.acegisecurity.acls.Acl
readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity object)
org.acegisecurity.acls.Acl
readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity object, @Nullable org.acegisecurity.acls.sid.Sid[] sids)
Map<org.acegisecurity.acls.objectidentity.ObjectIdentity,org.acegisecurity.acls.Acl>
readAclsById(org.acegisecurity.acls.objectidentity.ObjectIdentity[] objects)
Map<org.acegisecurity.acls.objectidentity.ObjectIdentity,org.acegisecurity.acls.Acl>
readAclsById(org.acegisecurity.acls.objectidentity.ObjectIdentity[] objects, @Nullable org.acegisecurity.acls.sid.Sid[] sids)
org.acegisecurity.acls.MutableAcl
readMutableAclById(long objectId)
Read acl for given domain object idorg.acegisecurity.acls.MutableAcl
readMutableAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity objectId)
Same asAclService.readAclById(ObjectIdentity)
except it returns only a single MutableAcl.void
setAclDao(AclDao aclDao)
void
setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)
org.acegisecurity.acls.MutableAcl
updateAcl(org.acegisecurity.acls.MutableAcl acl)
void
updateAclAces(org.acegisecurity.acls.MutableAcl acl, List<String> newPermissionKeys)
-
-
-
Field Detail
-
BAMBOO_PERMISSION_FORM_SEPARATOR
public static final String BAMBOO_PERMISSION_FORM_SEPARATOR
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_USER
public static final String BAMBOO_PERMISSION_FORM_USER
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_GROUP
public static final String BAMBOO_PERMISSION_FORM_GROUP
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_ROLE
public static final String BAMBOO_PERMISSION_FORM_ROLE
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_USER_PREFIX
public static final String BAMBOO_PERMISSION_FORM_USER_PREFIX
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_GROUP_PREFIX
public static final String BAMBOO_PERMISSION_FORM_GROUP_PREFIX
- See Also:
- Constant Field Values
-
BAMBOO_PERMISSION_FORM_ROLE_PREFIX
public static final String BAMBOO_PERMISSION_FORM_ROLE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
findChildren
public org.acegisecurity.acls.objectidentity.ObjectIdentity[] findChildren(org.acegisecurity.acls.objectidentity.ObjectIdentity parentIdentity)
- Specified by:
findChildren
in interfaceorg.acegisecurity.acls.AclService
-
readAclById
public org.acegisecurity.acls.Acl readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity object) throws org.acegisecurity.acls.NotFoundException
- Specified by:
readAclById
in interfaceorg.acegisecurity.acls.AclService
- Throws:
org.acegisecurity.acls.NotFoundException
-
readAclById
public org.acegisecurity.acls.Acl readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity object, @Nullable @Nullable org.acegisecurity.acls.sid.Sid[] sids) throws org.acegisecurity.acls.NotFoundException
- Specified by:
readAclById
in interfaceorg.acegisecurity.acls.AclService
- Throws:
org.acegisecurity.acls.NotFoundException
-
readAclsById
public Map<org.acegisecurity.acls.objectidentity.ObjectIdentity,org.acegisecurity.acls.Acl> readAclsById(org.acegisecurity.acls.objectidentity.ObjectIdentity[] objects) throws org.acegisecurity.acls.NotFoundException
- Specified by:
readAclsById
in interfaceorg.acegisecurity.acls.AclService
- Throws:
org.acegisecurity.acls.NotFoundException
-
readAclsById
public Map<org.acegisecurity.acls.objectidentity.ObjectIdentity,org.acegisecurity.acls.Acl> readAclsById(org.acegisecurity.acls.objectidentity.ObjectIdentity[] objects, @Nullable @Nullable org.acegisecurity.acls.sid.Sid[] sids) throws org.acegisecurity.acls.NotFoundException
- Specified by:
readAclsById
in interfaceorg.acegisecurity.acls.AclService
- Throws:
org.acegisecurity.acls.NotFoundException
-
createAcl
public org.acegisecurity.acls.MutableAcl createAcl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity) throws org.acegisecurity.acls.AlreadyExistsException
- Specified by:
createAcl
in interfaceorg.acegisecurity.acls.MutableAclService
- Throws:
org.acegisecurity.acls.AlreadyExistsException
-
deleteAcl
public void deleteAcl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, boolean deleteChildren) throws org.acegisecurity.acls.ChildrenExistException
- Specified by:
deleteAcl
in interfaceorg.acegisecurity.acls.MutableAclService
- Throws:
org.acegisecurity.acls.ChildrenExistException
-
updateAcl
public org.acegisecurity.acls.MutableAcl updateAcl(org.acegisecurity.acls.MutableAcl acl) throws org.acegisecurity.acls.NotFoundException
- Specified by:
updateAcl
in interfaceorg.acegisecurity.acls.MutableAclService
- Throws:
org.acegisecurity.acls.NotFoundException
-
updateAclAces
public void updateAclAces(org.acegisecurity.acls.MutableAcl acl, List<String> newPermissionKeys)
- Specified by:
updateAclAces
in interfaceHibernateMutableAclService
-
deleteAllAcls
public void deleteAllAcls()
Description copied from interface:HibernateMutableAclService
Deletes all ACLs and permissions from the system... Do this *only* if you know what you're doing!- Specified by:
deleteAllAcls
in interfaceHibernateMutableAclService
-
readMutableAclById
public org.acegisecurity.acls.MutableAcl readMutableAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity objectId)
Description copied from interface:HibernateMutableAclService
Same asAclService.readAclById(ObjectIdentity)
except it returns only a single MutableAcl.- Specified by:
readMutableAclById
in interfaceHibernateMutableAclService
- Returns:
-
readMutableAclById
public org.acegisecurity.acls.MutableAcl readMutableAclById(long objectId)
Description copied from interface:HibernateMutableAclService
Read acl for given domain object id- Specified by:
readMutableAclById
in interfaceHibernateMutableAclService
- Returns:
-
getCacheStats
public BambooCacheStats getCacheStats()
- Specified by:
getCacheStats
in interfaceHibernateMutableAclService
-
invalidateCache
public void invalidateCache()
- Specified by:
invalidateCache
in interfaceHibernateMutableAclService
-
setAclDao
public void setAclDao(AclDao aclDao)
-
setAclUpdateHelper
public void setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)
-
deleteAcesForSid
public void deleteAcesForSid(org.acegisecurity.acls.sid.Sid sid)
Description copied from interface:HibernateMutableAclService
Deleted all access control entries associated with a given security identity.- Specified by:
deleteAcesForSid
in interfaceHibernateMutableAclService
-
hasAcesForSid
public boolean hasAcesForSid(org.acegisecurity.acls.sid.Sid sid)
Description copied from interface:HibernateMutableAclService
Check if givenSid
has anyAccessControlEntry
s.- Specified by:
hasAcesForSid
in interfaceHibernateMutableAclService
- Returns:
- true if sid has aces.
-
changeAlcOwnerForSid
public void changeAlcOwnerForSid(org.acegisecurity.acls.sid.Sid oldOwner, org.acegisecurity.acls.sid.Sid newOwner)
Description copied from interface:HibernateMutableAclService
Change the ownership of all Acls owned byoldOwner
tonewOwner
.- Specified by:
changeAlcOwnerForSid
in interfaceHibernateMutableAclService
-
getAclOfGlobalPermission
public org.acegisecurity.acls.MutableAcl getAclOfGlobalPermission()
Description copied from interface:HibernateMutableAclService
Read acl for the global permission object- Specified by:
getAclOfGlobalPermission
in interfaceHibernateMutableAclService
- Returns:
-
initialiseCache
public void initialiseCache()
Description copied from interface:HibernateMutableAclService
Warm up the cache.- Specified by:
initialiseCache
in interfaceHibernateMutableAclService
-
-