java.lang.Object
org.jeteam.bean.security.PrivilegeBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable
- Direct Known Subclasses:
- PrivilegeBeanImpl
- public abstract class PrivilegeBean
- extends java.lang.Object
- implements javax.ejb.EntityBean
A privilege represents an authorization for a certain action in
the system. It is represented by the permission attribute that
indicates what specific action is authorized.
There are two types of privileges:
1. First there are fine-grained privileges, these operate on the
level of a specific method call, for example the permission
User.createUser represents the authorization to create a new
user in the system.
2. Secondly there are coarse-grained privileges, these are the
ones that give authorization for a whole entity, for example the
permission User represents the authorization to have
full control over all user services as defined in the UserService
EJB.
The description is an optional piece of text that gives a little
more information about this privilige, however, most of the time
this will be left empty.
Privileges are typically assigned to roles, but it is not
mandatory to do so. However, when a privilege is not assigned to
a role it has no purpose in the system; the reason to allow a
privilege not to have any roles associated to it is pure for ease
of use in case you would like to prepare some priviliges do not
want to use them yet, this can be considered a business
requirement.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrivilegeBean
public PrivilegeBean()
getId
public abstract java.lang.String getId()
setId
public abstract void setId(java.lang.String newValue)
getPermission
public abstract java.lang.String getPermission()
setPermission
public abstract void setPermission(java.lang.String newValue)
getDescription
public abstract java.lang.String getDescription()
setDescription
public abstract void setDescription(java.lang.String newValue)
getRoles
public abstract java.util.Collection getRoles()
setRoles
public abstract void setRoles(java.util.Collection roles)
getPrivilegeData
public org.jeteam.bean.security.PrivilegeData getPrivilegeData()
setPrivilegeData
public void setPrivilegeData(org.jeteam.bean.security.PrivilegeData value)
ejbCreate
public java.lang.String ejbCreate(java.lang.String permission,
java.lang.String description)
throws javax.ejb.CreateException
ejbPostCreate
public void ejbPostCreate(java.lang.String permission,
java.lang.String description)
throws javax.ejb.CreateException
ejbCreate
public java.lang.String ejbCreate(org.jeteam.bean.security.PrivilegeData data)
throws javax.ejb.CreateException
ejbPostCreate
public void ejbPostCreate(org.jeteam.bean.security.PrivilegeData data)
throws javax.ejb.CreateException
ejbRemove
public void ejbRemove()
throws javax.ejb.RemoveException
- Specified by:
ejbRemove in interface javax.ejb.EntityBean