Class DynamicRoleImpl
java.lang.Object
org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicRoleImpl
- All Implemented Interfaces:
Serializable,Role,SecurityEntity,DynamicRole
public class DynamicRoleImpl extends SecurityEntityImpl implements DynamicRole
Represents the "simple" model where permissions are related to roles, roles
are related to groups and groups are related to users, all in many to many
relationships.
- Version:
- $Id: DynamicRole.java 437451 2006-08-27 20:20:44Z tv $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DynamicRoleImpl() -
Method Summary
Modifier and Type Method Description voidaddGroup(Group group)This method should only be used by a RoleManager.voidaddPermission(Permission permission)This method should only be used by a RoleManager.GroupSetgetGroups()Get the groups this role belongs to<T extends Group>
Set<T>getGroupsAsSet()Get the groups this role belongs to as a SetPermissionSetgetPermissions()Get the permission that are part of this role<T extends Permission>
Set<T>getPermissionsAsSet()Get the permission that are part of this role as SetvoidremoveGroup(Group group)This method should only be used by a RoleManager.voidremovePermission(Permission permission)This method should only be used by a RoleManager.voidsetGroups(GroupSet groupSet)Set the groups this role belongs to<T extends Group>
voidsetGroupsAsSet(Set<T> groups)Set the groups this role belongs to as a SetvoidsetPermissions(PermissionSet permissionSet)Set the permission that are part of this role<T extends Permission>
voidsetPermissionsAsSet(Set<T> permissions)Set the permission that are part of this role as SetMethods inherited from class org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
equals, getId, getName, hashCode, setId, setName, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
Constructor Details
-
DynamicRoleImpl
public DynamicRoleImpl()
-
-
Method Details
-
getPermissions
Get the permission that are part of this role- Specified by:
getPermissionsin interfaceDynamicRole- Returns:
- a set of permissions
-
getPermissionsAsSet
Get the permission that are part of this role as Set- Specified by:
getPermissionsAsSetin interfaceDynamicRole- Returns:
- a set of permissions
-
setPermissions
Set the permission that are part of this role- Specified by:
setPermissionsin interfaceDynamicRole- Parameters:
permissionSet- a set of permissions
-
setPermissionsAsSet
Set the permission that are part of this role as Set- Specified by:
setPermissionsAsSetin interfaceDynamicRole- Parameters:
permissions- a set of permissions
-
addPermission
This method should only be used by a RoleManager. Not directly.- Specified by:
addPermissionin interfaceDynamicRole- Parameters:
permission- the Permission to add
-
removePermission
This method should only be used by a RoleManager. Not directly.- Specified by:
removePermissionin interfaceDynamicRole- Parameters:
permission- the Permission to remove
-
getGroups
Get the groups this role belongs to- Specified by:
getGroupsin interfaceDynamicRole- Returns:
- a set of groups
-
setGroups
Set the groups this role belongs to- Specified by:
setGroupsin interfaceDynamicRole- Parameters:
groupSet- the set of groups
-
removeGroup
This method should only be used by a RoleManager. Not directly.- Specified by:
removeGroupin interfaceDynamicRole- Parameters:
group- the Group to remove
-
addGroup
This method should only be used by a RoleManager. Not directly.- Specified by:
addGroupin interfaceDynamicRole- Parameters:
group- the Group to add
-
setGroupsAsSet
Set the groups this role belongs to as a Set- Specified by:
setGroupsAsSetin interfaceDynamicRole- Parameters:
groups- the set of groups
-
getGroupsAsSet
Get the groups this role belongs to as a Set- Specified by:
getGroupsAsSetin interfaceDynamicRole- Returns:
- a set of groups
-