Package org.appng.api
Interface PermissionProcessor
-
- All Known Implementing Classes:
DefaultPermissionProcessor
,DummyPermissionProcessor
public interface PermissionProcessor
Checks thePermission
s owned by aPermissionOwner
.- Author:
- Matthias Müller
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasPermission(String reference)
Checks whether thePermission
identified by the givenreference
is present.boolean
hasPermissions(PermissionOwner permissionOwner)
Checks whether all of thePermissionOwner
sPermission
s are present.boolean
hasReadPermission(FieldDef fieldDefinition)
Checks whether thePermission
s to read the value for the givenFieldDef
are present.boolean
hasWritePermission(FieldDef fieldDefinition)
Checks whether thePermission
s to write the value for the givenFieldDef
are present.
-
-
-
Method Detail
-
hasPermissions
boolean hasPermissions(PermissionOwner permissionOwner)
Checks whether all of thePermissionOwner
sPermission
s are present.- Parameters:
permissionOwner
- thePermissionOwner
- Returns:
true
if all permissions are present,false
otherwise
-
hasPermission
boolean hasPermission(String reference)
Checks whether thePermission
identified by the givenreference
is present.- Parameters:
reference
- the name of thePermission
to check- Returns:
true
if the permission is present,false
otherwise- See Also:
Permission.getRef()
-
hasWritePermission
boolean hasWritePermission(FieldDef fieldDefinition)
Checks whether thePermission
s to write the value for the givenFieldDef
are present.- Parameters:
fieldDefinition
- theFieldDef
to check the write-permission for- Returns:
true
if the permissions are present and theFieldDef
isn't readonly,false
otherwise- See Also:
FieldDef.getReadonly()
,FieldPermissions
,FieldPermissionType.WRITE
-
hasReadPermission
boolean hasReadPermission(FieldDef fieldDefinition)
Checks whether thePermission
s to read the value for the givenFieldDef
are present.- Parameters:
fieldDefinition
- theFieldDef
to check the read-permission for- Returns:
true
if the permissions are present,false
otherwise- See Also:
FieldPermissions
,FieldPermissionType.READ
-
-