public class DefaultPermissionProcessor extends Object implements PermissionProcessor
PermissionProcessor implementation.| Constructor and Description |
|---|
DefaultPermissionProcessor(Subject subject,
Site site,
Application application)
Creates a new DefaultPermissionProcessor for the given
Subject. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasPermission(String permissionRef)
Checks whether the
Permission identified by the given reference is present. |
boolean |
hasPermissions(PermissionOwner permissionOwner)
Checks whether all of the
PermissionOwners Permissions are present. |
boolean |
hasReadPermission(FieldDef fieldDefinition)
Checks whether the
Permissions to read the value for the given FieldDef are present. |
boolean |
hasWritePermission(FieldDef fieldDefinition)
Checks whether the
Permissions to write the value for the given FieldDef are present. |
public DefaultPermissionProcessor(Subject subject, Site site, Application application)
Subject. The current Subject uses the
given Application on the given Site.subject - the current Subject (if any)site - the Site currently used by the Subjectapplication - the Application currently used by the Subjectpublic boolean hasPermissions(PermissionOwner permissionOwner)
PermissionProcessorPermissionOwners Permissions are present.hasPermissions in interface PermissionProcessorpermissionOwner - the PermissionOwnertrue if all permissions are present, false otherwisepublic boolean hasPermission(String permissionRef)
PermissionProcessorPermission identified by the given reference is present.hasPermission in interface PermissionProcessorpermissionRef - the name of the Permission to checktrue if the permission is present, false otherwisePermission.getRef()public boolean hasWritePermission(FieldDef fieldDefinition)
PermissionProcessorPermissions to write the value for the given FieldDef are present.hasWritePermission in interface PermissionProcessorfieldDefinition - the FieldDef to check the write-permission fortrue if the permissions are present and the FieldDef isn't readonly, false
otherwiseFieldDef.getReadonly(),
FieldPermissions,
FieldPermissionType.WRITEpublic boolean hasReadPermission(FieldDef fieldDefinition)
PermissionProcessorPermissions to read the value for the given FieldDef are present.hasReadPermission in interface PermissionProcessorfieldDefinition - the FieldDef to check the read-permission fortrue if the permissions are present, false otherwiseFieldPermissions,
FieldPermissionType.READCopyright © 2011–2017 aiticon GmbH. All rights reserved.