|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.turbine.services.security.torque.TorqueObject
org.apache.turbine.services.security.torque.TorqueGroup
public class TorqueGroup
This class represents a Group of Users in the system that are associated
with specific entity or resource. The users belonging to the Group may
have various Roles. The Permissions to perform actions upon the resource
depend on the Roles in the Group that they are assigned. It is separated
from the actual Torque peer object to be able to replace the Peer with an
user supplied Peer (and Object)
Certain Roles that the Users may have in the system are not related
to any specific resource nor entity.
They are assigned within a special group named 'global' that can be
referenced in the code as
Group.GLOBAL_GROUP_NAME.
| Field Summary |
|---|
| Fields inherited from class org.apache.turbine.services.security.torque.TorqueObject |
|---|
obj |
| Fields inherited from interface org.apache.turbine.om.security.Group |
|---|
GLOBAL_GROUP_NAME |
| Constructor Summary | |
|---|---|
TorqueGroup()
Constructs a new Group. |
|
TorqueGroup(org.apache.torque.om.Persistent obj)
The package private Constructor is used when the GroupPeerManager has retrieved a list of Database Objects from the peer and must 'wrap' them into TorqueGroup Objects. |
|
TorqueGroup(String name)
Constructs a new Group with the specified name. |
|
| Method Summary | |
|---|---|
static Group |
create(String name)
Deprecated. Please use the createGroup method in TurbineSecurity now. |
static Group |
getGlobalGroup()
Deprecated. Please use the method in TurbineSecurity now. |
int |
getId()
Gets the Id of this object |
Integer |
getIdAsObj()
Gets the Id of this object |
String |
getName()
Returns the name of this object. |
org.apache.torque.om.Persistent |
getPersistentObj()
Returns the underlying Object for the Peer Used in the GroupPeerManager when building a new Criteria. |
void |
grant(User user,
Role role)
Grants a Role in this Group to an User. |
void |
grant(User user,
RoleSet roleSet)
Grants Roles in this Group to an User. |
void |
remove()
Removes a group from the system. |
void |
rename(String name)
Renames the role. |
void |
revoke(User user,
Role role)
Revokes a Role in this Group from an User. |
void |
revoke(User user,
RoleSet roleSet)
Revokes Roles in this group from an User. |
void |
save()
Makes changes made to the Group attributes permanent. |
void |
setId(int id)
Sets the Id of this object |
void |
setName(String name)
Sets the name of this object. |
| Methods inherited from class org.apache.turbine.services.security.torque.TorqueObject |
|---|
compareTo, equals, equals, getPrimaryKey, hashCode, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public TorqueGroup()
public TorqueGroup(String name)
name - The name of the new object.public TorqueGroup(org.apache.torque.om.Persistent obj)
obj - An Object from the peer| Method Detail |
|---|
public org.apache.torque.om.Persistent getPersistentObj()
getPersistentObj in class TorqueObjectpublic String getName()
getName in interface SecurityEntitygetName in class TorqueObjectpublic void setName(String name)
setName in interface SecurityEntitysetName in class TorqueObjectname - The name of the object.public int getId()
getId in interface SecurityEntitypublic Integer getIdAsObj()
getIdAsObj in interface SecurityEntitypublic void setId(int id)
setId in interface SecurityEntityid - The new Idpublic static Group getGlobalGroup()
public static Group create(String name)
throws TurbineSecurityException
name - The name of the new Group.
TurbineSecurityException - if the Group could not be created.
public void save()
throws TurbineSecurityException
save in interface org.apache.torque.om.Persistentsave in interface Groupsave in class TorqueObjectTurbineSecurityException - if there is a problem while
saving data.
public void remove()
throws TurbineSecurityException
remove in interface GroupTurbineSecurityException - if the Group could not be removed.
public void rename(String name)
throws TurbineSecurityException
rename in interface Groupname - The new Group name.
TurbineSecurityException - if the Group could not be renamed.
public void grant(User user,
Role role)
throws TurbineSecurityException
grant in interface Groupuser - An User.role - A Role.
TurbineSecurityException - if there is a problem while assigning
the Role.
public void grant(User user,
RoleSet roleSet)
throws TurbineSecurityException
grant in interface Groupuser - An User.roleSet - A RoleSet.
TurbineSecurityException - if there is a problem while assigning
the Roles.
public void revoke(User user,
Role role)
throws TurbineSecurityException
revoke in interface Groupuser - An User.role - A Role.
TurbineSecurityException - if there is a problem while unassigning
the Role.
public void revoke(User user,
RoleSet roleSet)
throws TurbineSecurityException
revoke in interface Groupuser - An User.roleSet - a RoleSet.
TurbineSecurityException - if there is a problem while unassigning
the Roles.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||