@Service @Transactional public class CustomAclServiceImpl extends Object implements CustomAclService
| Constructor and Description |
|---|
CustomAclServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCreatorPermissions(AclAwareModel target)
Adds the creator permissions.
|
boolean |
addPermissions(AclAwareModel entity,
AclSid sid,
Map<Integer,Boolean> permissions)
Adds the permissions.
|
boolean |
addPermissions(long objectIdIdentity,
String className,
AclSid sid,
Map<Integer,Boolean> permissions)
Adds the permissions.
|
Map<Integer,Boolean> |
blankPermissionsMap()
Utility method that creates a non-granting permission map
|
AclObjectIdentity |
ensureObjectIdentity(String className,
long objectIdIdentity)
Ensure object identity.
|
List<AclEntry> |
getAclEntries(AclAwareModel entity)
Gets the acl entries.
|
List<AclEntry> |
getAclEntries(AclObjectIdentity objectIdentity)
Gets the acl entries.
|
AclSid |
getAuthoritySid(String authority)
Gets the sid of the specified authority
|
org.springframework.security.acls.model.Permission[] |
getAvailablePermissions(String className)
Gets the available permissions.
|
AclObjectIdentity |
getObjectIdentity(AclAwareModel entity)
Gets the object identity.
|
AclObjectIdentity |
getObjectIdentity(String className,
long id)
Gets the object identity.
|
Map<String,Map<Integer,Boolean>> |
getPermissions(AclAwareModel entity)
Gets the permissions.
|
Map<String,Map<Integer,Boolean>> |
getPermissions(long id,
String className)
Gets the permissions.
|
AclSid |
getSid(Long id)
Get SID by ID
|
List<AclSid> |
getSids(AclAwareModel entity)
Gets the sids.
|
List<AclSid> |
getSids(long id,
String className)
Gets the 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.
|
void |
removePermissions(AclAwareModel target)
Removes the permissions on ACL model.
|
void |
removePermissionsFor(AclSid sid)
Removes the all permissions of SID.
|
void |
updatePermissions(AclAwareModel entity,
AclSid sid,
Map<Integer,Boolean> permissions)
Update permissions.
|
void |
updatePermissions(AclObjectIdentity objectIdentity,
AclSid sid,
Map<Integer,Boolean> permissions) |
public Map<Integer,Boolean> blankPermissionsMap()
CustomAclServiceblankPermissionsMap in interface CustomAclService@Transactional(readOnly=true) public AclSid getSid(Long id)
CustomAclServicegetSid in interface CustomAclServiceid - -- ID of an AclSid entitypublic AclSid getAuthoritySid(String authority)
CustomAclServicegetAuthoritySid in interface CustomAclServiceauthority - the authority@Transactional(propagation=REQUIRED) public void addCreatorPermissions(AclAwareModel target)
CustomAclServiceaddCreatorPermissions in interface CustomAclServicetarget - the target@Transactional(propagation=REQUIRED) public void removePermissions(AclAwareModel target)
CustomAclServiceremovePermissions in interface CustomAclServicetarget - the target@Transactional(propagation=REQUIRED) public void removePermissionsFor(AclSid sid)
CustomAclServiceremovePermissionsFor in interface CustomAclServicesid - the sid@Transactional(readOnly=true) public AclObjectIdentity getObjectIdentity(String className, long id)
CustomAclServicegetObjectIdentity in interface CustomAclServiceclassName - the clazzid - the id@Transactional(readOnly=true) public AclObjectIdentity getObjectIdentity(AclAwareModel entity)
CustomAclServicegetObjectIdentity in interface CustomAclServiceentity - the entity@Transactional(readOnly=true) public org.springframework.security.acls.model.Permission[] getAvailablePermissions(String className)
CustomAclServicegetAvailablePermissions in interface CustomAclServiceclassName - the class name@Transactional(readOnly=true) @PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#id, #className, \'ADMINISTRATION\')") public Map<String,Map<Integer,Boolean>> getPermissions(long id, String className)
CustomAclServicegetPermissions in interface CustomAclServiceid - the idclassName - the class name@Transactional(readOnly=true) @PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#entity, \'ADMINISTRATION\')") public Map<String,Map<Integer,Boolean>> getPermissions(AclAwareModel entity)
CustomAclServicegetPermissions in interface CustomAclServiceentity - the entity@PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#entity, \'ADMINISTRATION\')") public void updatePermissions(AclAwareModel entity, AclSid sid, Map<Integer,Boolean> permissions)
CustomAclServiceupdatePermissions in interface CustomAclServiceentity - the entitysid - the sidpermissions - the permission map@PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#objectIdentity.objectIdIdentity, #objectIdentity.aclClass.aclClass, \'ADMINISTRATION\')") public void updatePermissions(AclObjectIdentity objectIdentity, AclSid sid, Map<Integer,Boolean> permissions)
updatePermissions in interface CustomAclService@Transactional(readOnly=true) @PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#objectIdentity.objectIdIdentity, #objectIdentity.aclClass.aclClass, \'ADMINISTRATION\')") public List<AclEntry> getAclEntries(AclObjectIdentity objectIdentity)
CustomAclServicegetAclEntries in interface CustomAclServiceobjectIdentity - the object identity@Transactional(readOnly=true) public List<AclEntry> getAclEntries(AclAwareModel entity)
CustomAclServicegetAclEntries in interface CustomAclServiceentity - the entity@Transactional(readOnly=true) public List<AclSid> getSids(long id, String className)
CustomAclServicegetSids in interface CustomAclServiceid - the idclassName - the class name@Transactional(readOnly=true) @PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#entity, \'ADMINISTRATION\')") public List<AclSid> getSids(AclAwareModel entity)
CustomAclServicegetSids in interface CustomAclServiceentity - the entitypublic boolean addPermissions(AclAwareModel entity, AclSid sid, Map<Integer,Boolean> permissions)
CustomAclServiceaddPermissions in interface CustomAclServiceentity - the entitysid - the sidpermissions - the permission map@PreAuthorize(value="hasRole(\'ADMINISTRATOR\') or hasPermission(#objectIdIdentity, #className, \'ADMINISTRATION\')")
public boolean addPermissions(long objectIdIdentity,
String className,
AclSid sid,
Map<Integer,Boolean> permissions)
CustomAclServiceaddPermissions in interface CustomAclServiceobjectIdIdentity - the object id identityclassName - the class namesid - TODOpermissions - the permissions@Transactional public AclObjectIdentity ensureObjectIdentity(String className, long objectIdIdentity)
CustomAclServiceensureObjectIdentity in interface CustomAclServiceclassName - the class nameobjectIdIdentity - the object id identity@Transactional(readOnly=true) public List<Long> listObjectIdentityIdsForSid(Class<? extends AclAwareModel> clazz, AclSid sid, org.springframework.security.acls.model.Permission permission)
CustomAclServicelistObjectIdentityIdsForSid in interface CustomAclServiceclazz - the clazzsid - the sidpermission - the permissionCopyright © 2018 Global Crop Diversity Trust. All rights reserved.