|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.turbine.om.security.SecurityObject<Role>
org.apache.turbine.om.security.TurbineRole
public class TurbineRole
This class represents a role played by the User associated with the current Session.
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, 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 Rolejava.lang.Exception - a generic exception.public void setPermissions(PermissionSet permissionSet)
setPermissions in interface RolepermissionSet - A PermissionSet.
public Role create(java.lang.String name)
throws TurbineSecurityException
create in interface Rolename - The name of the new Role.
TurbineSecurityException - if the Role could not be created.
public void save()
throws TurbineSecurityException
save in interface RoleTurbineSecurityException - if there is a problem while
saving data.
public void save(java.sql.Connection conn)
throws java.lang.Exception
conn -
java.lang.Exception
public void save(java.lang.String dbname)
throws java.lang.Exception
dbname -
java.lang.Exception
public void remove()
throws TurbineSecurityException
remove in interface RoleTurbineSecurityException - if the Role could not be removed.
public void rename(java.lang.String name)
throws TurbineSecurityException
rename in interface Rolename - The new Role name.
TurbineSecurityException - if the Role could not be renamed.
public void grant(Permission permission)
throws TurbineSecurityException
grant in interface Rolepermission - A Permission.
TurbineSecurityException - if there is a problem while assigning
the Permission.
public void grant(PermissionSet permissionSet)
throws TurbineSecurityException
grant in interface RolepermissionSet - A PermissionSet.
TurbineSecurityException - if there is a problem while assigning
the Permissions.
public void revoke(Permission permission)
throws TurbineSecurityException
revoke in interface Rolepermission - A Permission.
TurbineSecurityException - if there is a problem while unassigning
the Permission.
public void revoke(PermissionSet permissionSet)
throws TurbineSecurityException
revoke in interface RolepermissionSet - 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 | |||||||||