|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.torque.om.BaseObject | +--org.apache.turbine.om.security.SecurityObject | +--org.apache.turbine.om.security.TurbineGroup
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.
Certain Roles that the Users may have in the system may 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
.
Fields inherited from class org.apache.torque.om.BaseObject |
NEW_ID |
Fields inherited from interface org.apache.turbine.om.security.Group |
GLOBAL_GROUP_NAME |
Constructor Summary | |
TurbineGroup()
Constructs a new Group. |
|
TurbineGroup(java.lang.String name)
Constructs a new Group with the specified name. |
Method Summary | |
static Group |
create(java.lang.String name)
Deprecated. Please use the createGroup method in TurbineSecurity now. |
static Group |
getGlobalGroup()
Deprecated. Please use the method in TurbineSecurity now. |
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(java.lang.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 |
save(java.sql.Connection conn)
not implemented |
void |
save(java.lang.String dbname)
not implemented |
Methods inherited from class org.apache.turbine.om.security.SecurityObject |
compareTo, getAttribute, getAttributes, getName, setAttribute, setAttributes, setName, toString |
Methods inherited from class org.apache.torque.om.BaseObject |
equals, equals, getByName, getByPeerName, getByPosition, getCategory, getPrimaryKey, getPrimaryKeyAsBigDecimal, getPrimaryKeyAsInt, getPrimaryKeyAsLong, getPrimaryKeyAsString, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, 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.Group |
getName, setName |
Constructor Detail |
public TurbineGroup()
public TurbineGroup(java.lang.String name)
name
- The name of the new object.Method Detail |
public static Group getGlobalGroup()
public static Group create(java.lang.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 Group
save
in class org.apache.torque.om.BaseObject
TurbineSecurityException
- if there is a problem while
saving data.public void save(java.sql.Connection conn) throws java.lang.Exception
save
in class org.apache.torque.om.BaseObject
conn
- java.lang.Exception
- public void save(java.lang.String dbname) throws java.lang.Exception
save
in class org.apache.torque.om.BaseObject
dbname
- java.lang.Exception
- public void remove() throws TurbineSecurityException
remove
in interface Group
TurbineSecurityException
- if the Group could not be removed.public void rename(java.lang.String name) throws TurbineSecurityException
rename
in interface Group
name
- The new Group name.TurbineSecurityException
- if the Group could not be renamed.public void grant(User user, Role role) throws TurbineSecurityException
grant
in interface Group
user
- 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 Group
user
- 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 Group
user
- 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 Group
user
- An User.roleSet
- a RoleSet.TurbineSecurityException
- if there is a problem while unassigning
the Roles.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |