Class TurbinePermissionImpl
- java.lang.Object
-
- org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
-
- org.apache.fulcrum.security.model.turbine.entity.impl.TurbinePermissionImpl
-
- All Implemented Interfaces:
Serializable,Permission,SecurityEntity,TurbinePermission
public class TurbinePermissionImpl extends SecurityEntityImpl implements TurbinePermission
Represents the "turbine" model where permissions are in a many to many relationship to roles, roles are related to groups are related to users, all in many to many relationships.- Version:
- $Id: TurbinePermission.java 223081 2004-10-07 15:11:58Z epugh $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TurbinePermissionImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRole(Role role)Add a role to this permissionRoleSetgetRoles()Get the roles that this permission belongs to<T extends Role>
Set<T>getRolesAsSet()Get the roles that this permission belongs to as SetvoidremoveRole(Role role)Remove a role from this permissionvoidsetRoles(RoleSet roleSet)Set the roles that this permission belongs to<T extends Role>
voidsetRolesAsSet(Set<T> roles)Set the roles that this permission belongs to as Set-
Methods inherited from class org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
equals, getId, getName, hashCode, setId, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
-
-
-
Method Detail
-
getRoles
public RoleSet getRoles()
Get the roles that this permission belongs to- Specified by:
getRolesin interfaceTurbinePermission- Returns:
- a set of roles
-
setRoles
public void setRoles(RoleSet roleSet)
Set the roles that this permission belongs to- Specified by:
setRolesin interfaceTurbinePermission- Parameters:
roleSet- a set of roles
-
addRole
public void addRole(Role role)
Add a role to this permission- Specified by:
addRolein interfaceTurbinePermission- Parameters:
role- the role to add
-
removeRole
public void removeRole(Role role)
Remove a role from this permission- Specified by:
removeRolein interfaceTurbinePermission- Parameters:
role- the role to remove
-
setRolesAsSet
public <T extends Role> void setRolesAsSet(Set<T> roles)
Set the roles that this permission belongs to as Set- Specified by:
setRolesAsSetin interfaceTurbinePermission- Type Parameters:
T- Role- Parameters:
roles- a set of roles
-
getRolesAsSet
public <T extends Role> Set<T> getRolesAsSet()
Get the roles that this permission belongs to as Set- Specified by:
getRolesAsSetin interfaceTurbinePermission- Returns:
- a set of roles
-
-