Interface CustomAclService
- All Superinterfaces:
JsonSidConverter.SidProvider
- All Known Implementing Classes:
CustomAclServiceImpl
The Interface CustomAclService.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classWrapsAclObjectIdentityand adds list of inherited permissions. -
Method Summary
Modifier and TypeMethodDescriptionvoidCleanup ACL: removeAclEntryandAclObjectIdentityfor missing ACL-aware entities, remove obsoleteAclClass.Adds the creator permissions or updates permission inheritance.createOrUpdatePermissions(AclAwareModel target, AclSid ownerSid) Adds the creator permissions or updates permission inheritance.ensureAuthoritySid(String authority) Gets (and creates if missing) the sid for the specified authority.ensureObjectIdentity(long id, String className) Ensure object identity.getAclEntries(AclAwareModel entity) Gets the acl entries.getAclEntries(AclObjectIdentity objectIdentity) Gets the acl entries.getAuthoritySid(String authority) Gets the sid for the specified authority.org.springframework.security.acls.model.Permission[]getAvailablePermissions(String className) Gets the available permissions.getObjectIdentity(long id) Get object identity by internal id.getObjectIdentity(long id, String className) Gets the object identity for object of type className with specified id.getObjectIdentity(AclAwareModel entity) Gets the object identity of the entity.getPermissions(long id, String className) Gets the permissions.getPermissions(AclAwareModel entity) Gets the permissions.Get SID by ID.Gets the sid id.getSidName(long id) Gets the sid name.Gets the sids.getSids(AclAwareModel entity) Gets the sids.List authority sids.listObjectIdentityIdsForSid(Class<? extends AclAwareModel> clazz, AclSid sid, org.springframework.security.acls.model.Permission permission) List IDs of the specified class for the SID with specified permissions.loadObjectIdentityExt(AclObjectIdentity objectIdentity) Load object identity extended information.voidmakePubliclyReadable(AclAwareModel aclAwareModel, boolean publiclyReadable) Make entity publicly readable (or not).voidremoveAclAwareModel(AclAwareModel target) Removes the permissions on ACL model.removeAuthoritySid(String authorityName) Removes the sid of the specified authority.removePermissions(AclObjectIdentity objectIdentity, AclSid aclSid) Removes the permissions for SID on ACL OID.voidRemoves the all permissions of SID.setAclParent(AclAwareModel target, AclAwareModel parent) Set ACL parent object for inherited permissions.setPermissions(AclAwareModel entity, AclSid sid, Permissions permissions) Update permissions.setPermissions(AclObjectIdentity objectIdentity, AclSid sid, Permissions permissions) Update permissions.updateInheriting(long objectIdIdentity, boolean entriesInheriting) Updates inheriting status of object identity.updateParentObject(long objectIdIdentity, long parentObjectId) Updates parent object of object identity.
-
Method Details
-
getAvailablePermissions
Gets the available permissions.- Parameters:
className- the class name- Returns:
- the available permissions
-
getSid
Get SID by ID.- Parameters:
id- -- ID of an AclSid entity- Returns:
- persisted AclSid entity with specified id
-
getAuthoritySid
Gets the sid for the specified authority.- Parameters:
authority- the authority (must start with "ROLE_")- Returns:
- the authority sid
-
ensureAuthoritySid
Gets (and creates if missing) the sid for the specified authority.- Parameters:
authority- the authority (must start with "ROLE_")- Returns:
- the authority sid
-
removeAuthoritySid
Removes the sid of the specified authority.- Parameters:
authorityName- the authority name- Returns:
- the acl sid
-
listAuthoritySids
List authority sids.- Returns:
- the list of
AclSidfor authorities
-
createOrUpdatePermissions
Adds the creator permissions or updates permission inheritance.- Parameters:
entity- the target- Returns:
- the acl object identity
-
createOrUpdatePermissions
Adds the creator permissions or updates permission inheritance.- Parameters:
target- the ACL entityownerSid- Owner- Returns:
- the acl object identity
-
updateInheriting
Updates inheriting status of object identity.- Parameters:
objectIdIdentity- the id of object identityentriesInheriting- the inheriting status- Returns:
- the acl object identity
-
updateParentObject
Updates parent object of object identity.- Parameters:
objectIdIdentity- the id of object identityparentObjectId- the id of parent object identity- Returns:
- the acl object identity
-
setAclParent
Set ACL parent object for inherited permissions.- Parameters:
target- the target ACL object on which to change ACLparent- the parent ACL object- Returns:
- the acl object identity
-
removeAclAwareModel
Removes the permissions on ACL model.- Parameters:
target- the target
-
removePermissionsFor
Removes the all permissions of SID.- Parameters:
sid- the sid
-
getObjectIdentity
Get object identity by internal id.- Parameters:
id- AclObjectIdentity id- Returns:
- the object identity
-
getObjectIdentity
Gets the object identity for object of type className with specified id.- Parameters:
id- the idclassName- the clazz- Returns:
- the object identity
-
getObjectIdentity
Gets the object identity of the entity.- Parameters:
entity- the entity- Returns:
- the object identity
-
getPermissions
Gets the permissions.- Parameters:
id- the idclassName- the class name- Returns:
- the permissions
-
getPermissions
Gets the permissions.- Parameters:
entity- the entity- Returns:
- the permissions
-
getAclEntries
Gets the acl entries.- Parameters:
objectIdentity- the object identity- Returns:
- the acl entries
-
setPermissions
Update permissions.- Parameters:
entity- the entitysid- the sidpermissions- the permissions- Returns:
- the acl object identity
-
setPermissions
AclObjectIdentity setPermissions(AclObjectIdentity objectIdentity, AclSid sid, Permissions permissions) Update permissions.- Parameters:
objectIdentity- the object identitysid- the sidpermissions- the permissions- Returns:
- the acl object identity
-
removePermissions
Removes the permissions for SID on ACL OID.- Parameters:
objectIdentity- the object identityaclSid- the acl sid- Returns:
- the acl object identity
-
getAclEntries
Gets the acl entries.- Parameters:
entity- the entity- Returns:
- the acl entries
-
getSids
Gets the sids.- Parameters:
id- the idclassName- the class name- Returns:
- the sids
-
getSids
Gets the sids.- Parameters:
entity- the entity- Returns:
- the sids
-
ensureObjectIdentity
Ensure object identity.- Parameters:
id- the object id identityclassName- the class name- Returns:
- the acl object identity
-
listObjectIdentityIdsForSid
List<Long> listObjectIdentityIdsForSid(Class<? extends AclAwareModel> clazz, AclSid sid, org.springframework.security.acls.model.Permission permission) List IDs of the specified class for the SID with specified permissions.- Parameters:
clazz- the clazzsid- the sidpermission- the permission- Returns:
- the list
-
makePubliclyReadable
Make entity publicly readable (or not).- Parameters:
aclAwareModel- The entitypubliclyReadable- true or false?- Since:
- 1.4
-
cleanupAcl
void cleanupAcl()Cleanup ACL: removeAclEntryandAclObjectIdentityfor missing ACL-aware entities, remove obsoleteAclClass. -
getSidId
Gets the sid id.- Parameters:
sid- the sid- Returns:
- the sid id
-
getSidName
Gets the sid name.- Specified by:
getSidNamein interfaceJsonSidConverter.SidProvider- Parameters:
id- the id- Returns:
- the sid name
-
loadObjectIdentityExt
Load object identity extended information.- Parameters:
objectIdentity- the object identity- Returns:
- the acl object identity ext
-