Interface PermissionService
-
- All Known Implementing Classes:
PermissionServiceDecorator,PermissionServiceImpl
public interface PermissionService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddType(String typeId)Add a Type to the databasevoidcreateAcl(org.springframework.security.acls.model.ObjectIdentity objectIdentity)Creates an access control list for the given object identityvoidcreatePermission(Permission permissions)Creates a permission for a user on an object identityvoidcreatePermissions(Set<Permission> permissions)Creates permissions for a user on an object identityvoiddeletePermission(org.springframework.security.acls.model.Sid sid, org.springframework.security.acls.model.ObjectIdentity objectIdentity)Deletes a existing permission for a user on an object identityvoiddeleteType(String typeId)Removes a Type from the databasebooleanexists(org.springframework.security.acls.model.ObjectIdentity objectIdentity, org.springframework.security.acls.model.Sid sid)Checks if a there is a permission in the system for the combination of a sid and an objectIdentitySet<LabelledType>getLabelledTypes()Retrieves the types that are available in the systemSet<LabelledObject>getObjects(String typeId, int page, int pageSize)Retrieves the objects of a type in the systemSet<LabelledPermission>getPermissions(Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)Retrieves all permissions for one or more usersSet<LabelledPermission>getPermissionsForObject(org.springframework.security.acls.model.ObjectIdentity objectIdentity, Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)Retrieves the permissions for a object for one or more usersMap<String,Set<LabelledPermission>>getPermissionsForType(String typeId, Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)Retrieves the permissions for all objects of a type for one or more usersMap<String,Set<LabelledPermission>>getPermissionsForType(String typeId, Set<org.springframework.security.acls.model.Sid> sids, int page, int pageSize)Retrieves the permissions for all objects of a type for one or more usersSet<PermissionSet>getSuitablePermissionsForType(String typeId)Retrieves the permissions that can be granted of objects of a certain typevoidupdatePermission(Permission permissions)Updates a existing permission for a user on an object identityvoidupdatePermissions(Set<Permission> permissions)Updates existing permissions for a user on an object identity
-
-
-
Method Detail
-
createAcl
void createAcl(org.springframework.security.acls.model.ObjectIdentity objectIdentity)
Creates an access control list for the given object identity- Throws:
org.springframework.security.acls.model.AlreadyExistsException- if this ACL already existsUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidPermissionNotSuitableException- if the permission is not suitable for the type of objectUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
createPermission
void createPermission(Permission permissions)
Creates a permission for a user on an object identity- Throws:
DuplicatePermissionException- if there is already a permission set for this combination of sid and objectIdentityUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidPermissionNotSuitableException- if the permission is not suitable for the type of objectUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
createPermissions
void createPermissions(Set<Permission> permissions)
Creates permissions for a user on an object identity- Throws:
DuplicatePermissionException- if there is already a permission set for a combination of sid and objectIdentityUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidPermissionNotSuitableException- if the permission is not suitable for the type of objectUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
updatePermission
void updatePermission(Permission permissions)
Updates a existing permission for a user on an object identity- Throws:
UnknownAceException- if there can be no permission found to updateUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidPermissionNotSuitableException- if the permission is not suitable for the type of objectUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
updatePermissions
void updatePermissions(Set<Permission> permissions)
Updates existing permissions for a user on an object identity- Throws:
UnknownAceException- if there can be no permission found to updateUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidPermissionNotSuitableException- if the permission is not suitable for the type of objectUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
deletePermission
void deletePermission(org.springframework.security.acls.model.Sid sid, org.springframework.security.acls.model.ObjectIdentity objectIdentity)Deletes a existing permission for a user on an object identity- Throws:
UnknownAceException- if there can be no permission found to deleteUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
addType
void addType(String typeId)
Add a Type to the database- Throws:
UnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
deleteType
void deleteType(String typeId)
Removes a Type from the database- Throws:
UnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
getPermissionsForType
Map<String,Set<LabelledPermission>> getPermissionsForType(String typeId, Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)
Retrieves the permissions for all objects of a type for one or more users- Throws:
ReadPermissionDeniedException- if the user misses the permissions required to retrieve permissions for this typeSidPermissionException- if the user misses the permissions required to retrieve permissions forInsufficientInheritancePermissionsException- if the user misses the permissions required to retrieve inheritance informationUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
getPermissionsForType
Map<String,Set<LabelledPermission>> getPermissionsForType(String typeId, Set<org.springframework.security.acls.model.Sid> sids, int page, int pageSize)
Retrieves the permissions for all objects of a type for one or more users- Throws:
ReadPermissionDeniedException- if the user misses the permissions required to retrieve permissions for this typeSidPermissionException- if the user misses the permissions required to retrieve permissions forUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
getPermissionsForObject
Set<LabelledPermission> getPermissionsForObject(org.springframework.security.acls.model.ObjectIdentity objectIdentity, Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)
Retrieves the permissions for a object for one or more users- Throws:
ReadPermissionDeniedException- if the user misses the permissions required to retrieve permissions for this objectSidPermissionException- if the user misses the permissions required to retrieve permissions forInsufficientInheritancePermissionsException- if the user misses the permissions required to retrieve inheritance informationUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
getPermissions
Set<LabelledPermission> getPermissions(Set<org.springframework.security.acls.model.Sid> sids, boolean includeInheritance)
Retrieves all permissions for one or more users- Throws:
InsufficientInheritancePermissionsException- if the user misses the permissions required to retrieve inheritance informationUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySid
-
getLabelledTypes
Set<LabelledType> getLabelledTypes()
Retrieves the types that are available in the system
-
getObjects
Set<LabelledObject> getObjects(String typeId, int page, int pageSize)
Retrieves the objects of a type in the system- Throws:
UnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
getSuitablePermissionsForType
Set<PermissionSet> getSuitablePermissionsForType(String typeId)
Retrieves the permissions that can be granted of objects of a certain type
-
exists
boolean exists(org.springframework.security.acls.model.ObjectIdentity objectIdentity, org.springframework.security.acls.model.Sid sid)Checks if a there is a permission in the system for the combination of a sid and an objectIdentity- Throws:
ReadPermissionDeniedException- if the user misses the permissions required to retrieve permissions for this objectSidPermissionException- if the user misses the permissions required to retrieve permissions forUnknownUserException- if no user could be found for a PrincipalSidUnknownRoleException- if no role could be found for a GrantedAuthoritySidUnknownEntityException- if the combination of Type and Identifier of the object identity does not corresponds to an entityUnknownEntityTypeException- if the Type of the object identity does not corresponds to an existing entity type
-
-