|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.om.BaseObject
org.apache.turbine.om.security.SecurityObject
org.apache.turbine.om.security.TurbineRole
This class represents a role played by the User associated with the current Session.
Field Summary |
Fields inherited from class org.apache.torque.om.BaseObject |
NEW_ID |
Constructor Summary | |
TurbineRole()
Constructs a new Role |
|
TurbineRole(java.lang.String name)
Constructs a new Role with the sepcified name. |
Method Summary | |
Role |
create(java.lang.String name)
Creates a new Role in the system. |
PermissionSet |
getPermissions()
Returns the set of Permissions associated with this Role. |
void |
grant(Permission permission)
Grants a Permission to this Role. |
void |
grant(PermissionSet permissionSet)
Grants Permissions from a PermissionSet to this Role. |
void |
remove()
Removes a role from the system. |
void |
rename(java.lang.String name)
Renames the role. |
void |
revoke(Permission permission)
Revokes a Permission from this Role. |
void |
revoke(PermissionSet permissionSet)
Revokes Permissions from a PermissionSet from this Role. |
void |
save()
Makes changes made to the Role attributes permanent. |
void |
save(java.sql.Connection conn)
not implemented |
void |
save(java.lang.String dbname)
not implemented |
void |
setPermissions(PermissionSet permissionSet)
Sets the Permissions associated with this Role. |
Methods inherited from class org.apache.turbine.om.security.SecurityObject |
compareTo, getAttribute, getAttributes, getId, getIdAsObj, getName, setAttribute, setAttributes, setId, setName, toString |
Methods inherited from class org.apache.torque.om.BaseObject |
equals, equals, getByName, getByPeerName, getByPosition, getLog, getPrimaryKey, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.turbine.om.security.SecurityEntity |
getId, getIdAsObj, getName, setId, setName |
Constructor Detail |
public TurbineRole()
public TurbineRole(java.lang.String name)
name
- The name of the new object.Method Detail |
public PermissionSet getPermissions() throws java.lang.Exception
getPermissions
in interface Role
java.lang.Exception
- a generic exception.public void setPermissions(PermissionSet permissionSet)
setPermissions
in interface Role
permissionSet
- A PermissionSet.public Role create(java.lang.String name) throws TurbineSecurityException
create
in interface Role
name
- The name of the new Role.
TurbineSecurityException
- if the Role could not be created.public void save() throws TurbineSecurityException
save
in interface Role
TurbineSecurityException
- if there is a problem while
saving data.public void save(java.sql.Connection conn) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
conn
-
java.lang.Exception
public void save(java.lang.String dbname) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
dbname
-
java.lang.Exception
public void remove() throws TurbineSecurityException
remove
in interface Role
TurbineSecurityException
- if the Role could not be removed.public void rename(java.lang.String name) throws TurbineSecurityException
rename
in interface Role
name
- The new Role name.
TurbineSecurityException
- if the Role could not be renamed.public void grant(Permission permission) throws TurbineSecurityException
grant
in interface Role
permission
- A Permission.
TurbineSecurityException
- if there is a problem while assigning
the Permission.public void grant(PermissionSet permissionSet) throws TurbineSecurityException
grant
in interface Role
permissionSet
- A PermissionSet.
TurbineSecurityException
- if there is a problem while assigning
the Permissions.public void revoke(Permission permission) throws TurbineSecurityException
revoke
in interface Role
permission
- A Permission.
TurbineSecurityException
- if there is a problem while unassigning
the Permission.public void revoke(PermissionSet permissionSet) throws TurbineSecurityException
revoke
in interface Role
permissionSet
- A PermissionSet.
TurbineSecurityException
- if there is a problem while unassigning
the Permissions.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |