Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Package com.RuntimeCollective.permission.bean

The Permission module provides support for much more flexible Permission logic than webapps.bean.PermissionBean.

See:
          Description

Interface Summary
Permissible Interface to implement if you want the access to your object to be constrained by PermissionRules.
PermissionRule Interface that defines a permission ruls, which determines whether a user has access to some part of the system.
 

Class Summary
PermissibleExtension An extension which can be used to stick the Permissible behaviour to any bean.
SimplePermissible A simple implementation of Permissible.
SimplePermissionRule A very simple implementation of PermissionRule.
UserGroupPermissionRule A permission rule whose behaviour depends on whether the user is a member of a group
 

Package com.RuntimeCollective.permission.bean Description

The Permission module provides support for much more flexible Permission logic than webapps.bean.PermissionBean. It is easy to define new PermissionRule logic classes, and to constrain any Object by such a PermissionRule class.


1. Creating a new permission.bean.PermissionRule

The PermissionRule interface is very simple: it has a Key (an internal identifier by which you can recognise ready-made instances), and two methods which will have to be re-defined by each implementation: There is a basic permission.bean.SimplePermissionRule implementation, which can only check whether the User is actually logged on (though it doesn't do anything with the webapps Session). It also simplifies the creation of new PermissionRules: if you extend SimplePermissionRule, you will only have to override getAuthorisationPath(User user). Check the SE module for an example of a sub-class of SimplePermissionRule.

2. Creating a new permission.bean.Permissible

Objects which implement the Permissible interface can be assigned a PermissionRule for any given "action". You can for example set up different PermissionRules for "view" and for "edit". Permissible is an extension of webapps.bean.PermissionBean, and is implemented by a basic permission.bean.SimplePermissible.

The permission.tag.CheckPermissionTag tag helps checking if a User can perform an "action" on a Permissible within a JSP page.