Interface CustomAclService
-
- All Superinterfaces:
JsonSidConverter.SidProvider
- All Known Implementing Classes:
CustomAclServiceImpl
public interface CustomAclService extends JsonSidConverter.SidProvider
The Interface CustomAclService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCustomAclService.AclObjectIdentityExtWrapsAclObjectIdentityand adds list of inherited permissions.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanupAcl()Cleanup ACL: removeAclEntryandAclObjectIdentityfor missing ACL-aware entities, remove obsoleteAclClass.AclObjectIdentitycreateOrUpdatePermissions(AclAwareModel entity)Adds the creator permissions or updates permission inheritance.AclObjectIdentitycreateOrUpdatePermissions(AclAwareModel target, AclSid ownerSid)Adds the creator permissions or updates permission inheritance.AclSidensureAuthoritySid(String authority)Gets (and creates if missing) the sid for the specified authority.AclObjectIdentityensureObjectIdentity(long id, String className)Ensure object identity.List<AclEntry>getAclEntries(AclAwareModel entity)Gets the acl entries.List<AclEntry>getAclEntries(AclObjectIdentity objectIdentity)Gets the acl entries.AclSidgetAuthoritySid(String authority)Gets the sid for the specified authority.org.springframework.security.acls.model.Permission[]getAvailablePermissions(String className)Gets the available permissions.AclObjectIdentitygetObjectIdentity(long id)Get object identity by internal id.AclObjectIdentitygetObjectIdentity(long id, String className)Gets the object identity for object of type className with specified id.AclObjectIdentitygetObjectIdentity(AclAwareModel entity)Gets the object identity of the entity.List<SidPermissions>getPermissions(long id, String className)Gets the permissions.List<SidPermissions>getPermissions(AclAwareModel entity)Gets the permissions.AclSidgetSid(Long id)Get SID by ID.LonggetSidId(String sid)Gets the sid id.StringgetSidName(long id)Gets the sid name.List<AclSid>getSids(long id, String className)Gets the sids.List<AclSid>getSids(AclAwareModel entity)Gets the sids.List<AclSid>listAuthoritySids()List authority sids.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.CustomAclService.AclObjectIdentityExtloadObjectIdentityExt(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.AclSidremoveAuthoritySid(String authorityName)Removes the sid of the specified authority.AclObjectIdentityremovePermissions(AclObjectIdentity objectIdentity, AclSid aclSid)Removes the permissions for SID on ACL OID.voidremovePermissionsFor(AclSid sid)Removes the all permissions of SID.AclObjectIdentitysetAclParent(AclAwareModel target, AclAwareModel parent)Set ACL parent object for inherited permissions.AclObjectIdentitysetPermissions(AclAwareModel entity, AclSid sid, Permissions permissions)Update permissions.AclObjectIdentitysetPermissions(AclObjectIdentity objectIdentity, AclSid sid, Permissions permissions)Update permissions.AclObjectIdentityupdateInheriting(long objectIdIdentity, boolean entriesInheriting)Updates inheriting status of object identity.AclObjectIdentityupdateParentObject(long objectIdIdentity, long parentObjectId)Updates parent object of object identity.
-
-
-
Method Detail
-
getAvailablePermissions
org.springframework.security.acls.model.Permission[] getAvailablePermissions(String className)
Gets the available permissions.- Parameters:
className- the class name- Returns:
- the available permissions
-
getSid
AclSid getSid(Long id)
Get SID by ID.- Parameters:
id- -- ID of an AclSid entity- Returns:
- persisted AclSid entity with specified id
-
getAuthoritySid
AclSid getAuthoritySid(String authority)
Gets the sid for the specified authority.- Parameters:
authority- the authority (must start with "ROLE_")- Returns:
- the authority sid
-
ensureAuthoritySid
AclSid ensureAuthoritySid(String authority)
Gets (and creates if missing) the sid for the specified authority.- Parameters:
authority- the authority (must start with "ROLE_")- Returns:
- the authority sid
-
removeAuthoritySid
AclSid removeAuthoritySid(String authorityName)
Removes the sid of the specified authority.- Parameters:
authorityName- the authority name- Returns:
- the acl sid
-
listAuthoritySids
List<AclSid> listAuthoritySids()
List authority sids.- Returns:
- the list of
AclSidfor authorities
-
createOrUpdatePermissions
AclObjectIdentity createOrUpdatePermissions(AclAwareModel entity)
Adds the creator permissions or updates permission inheritance.- Parameters:
entity- the target- Returns:
- the acl object identity
-
createOrUpdatePermissions
AclObjectIdentity createOrUpdatePermissions(AclAwareModel target, AclSid ownerSid)
Adds the creator permissions or updates permission inheritance.- Parameters:
target- the ACL entityownerSid- Owner- Returns:
- the acl object identity
-
updateInheriting
AclObjectIdentity updateInheriting(long objectIdIdentity, boolean entriesInheriting)
Updates inheriting status of object identity.- Parameters:
objectIdIdentity- the id of object identityentriesInheriting- the inheriting status- Returns:
- the acl object identity
-
updateParentObject
AclObjectIdentity updateParentObject(long objectIdIdentity, long parentObjectId)
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
AclObjectIdentity setAclParent(AclAwareModel target, AclAwareModel parent)
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
void removeAclAwareModel(AclAwareModel target)
Removes the permissions on ACL model.- Parameters:
target- the target
-
removePermissionsFor
void removePermissionsFor(AclSid sid)
Removes the all permissions of SID.- Parameters:
sid- the sid
-
getObjectIdentity
AclObjectIdentity getObjectIdentity(long id)
Get object identity by internal id.- Parameters:
id- AclObjectIdentity id- Returns:
- the object identity
-
getObjectIdentity
AclObjectIdentity getObjectIdentity(long id, String className)
Gets the object identity for object of type className with specified id.- Parameters:
id- the idclassName- the clazz- Returns:
- the object identity
-
getObjectIdentity
AclObjectIdentity getObjectIdentity(AclAwareModel entity)
Gets the object identity of the entity.- Parameters:
entity- the entity- Returns:
- the object identity
-
getPermissions
List<SidPermissions> getPermissions(long id, String className)
Gets the permissions.- Parameters:
id- the idclassName- the class name- Returns:
- the permissions
-
getPermissions
List<SidPermissions> getPermissions(AclAwareModel entity)
Gets the permissions.- Parameters:
entity- the entity- Returns:
- the permissions
-
getAclEntries
List<AclEntry> getAclEntries(AclObjectIdentity objectIdentity)
Gets the acl entries.- Parameters:
objectIdentity- the object identity- Returns:
- the acl entries
-
setPermissions
AclObjectIdentity setPermissions(AclAwareModel entity, AclSid sid, Permissions permissions)
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
AclObjectIdentity removePermissions(AclObjectIdentity objectIdentity, AclSid aclSid)
Removes the permissions for SID on ACL OID.- Parameters:
objectIdentity- the object identityaclSid- the acl sid- Returns:
- the acl object identity
-
getAclEntries
List<AclEntry> getAclEntries(AclAwareModel entity)
Gets the acl entries.- Parameters:
entity- the entity- Returns:
- the acl entries
-
getSids
List<AclSid> getSids(long id, String className)
Gets the sids.- Parameters:
id- the idclassName- the class name- Returns:
- the sids
-
getSids
List<AclSid> getSids(AclAwareModel entity)
Gets the sids.- Parameters:
entity- the entity- Returns:
- the sids
-
ensureObjectIdentity
AclObjectIdentity ensureObjectIdentity(long id, String className)
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
void makePubliclyReadable(AclAwareModel aclAwareModel, boolean publiclyReadable)
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.
-
getSidName
String getSidName(long id)
Gets the sid name.- Specified by:
getSidNamein interfaceJsonSidConverter.SidProvider- Parameters:
id- the id- Returns:
- the sid name
-
loadObjectIdentityExt
CustomAclService.AclObjectIdentityExt loadObjectIdentityExt(AclObjectIdentity objectIdentity)
Load object identity extended information.- Parameters:
objectIdentity- the object identity- Returns:
- the acl object identity ext
-
-