Interface DynamicRole
-
- All Superinterfaces:
Role
,SecurityEntity
,Serializable
- All Known Implementing Classes:
DynamicRoleImpl
public interface DynamicRole extends Role
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$
- Author:
- Eric Pugh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addGroup(Group group)
This method should only be used by a RoleManager.void
addPermission(Permission permission)
This method should only be used by a RoleManager.GroupSet
getGroups()
Get the groups this role belongs to<T extends Group>
Set<T>getGroupsAsSet()
Get the groups this role belongs to as a SetPermissionSet
getPermissions()
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 Setvoid
removeGroup(Group group)
This method should only be used by a RoleManager.void
removePermission(Permission permission)
This method should only be used by a RoleManager.void
setGroups(GroupSet groups)
Set the groups this role belongs to<T extends Group>
voidsetGroupsAsSet(Set<T> groups)
Set the groups this role belongs to as a Setvoid
setPermissions(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 Set-
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
-
-
-
Method Detail
-
getPermissions
PermissionSet getPermissions()
Get the permission that are part of this role- Returns:
- a set of permissions
-
getPermissionsAsSet
<T extends Permission> Set<T> getPermissionsAsSet()
Get the permission that are part of this role as Set- Returns:
- a set of permissions
-
setPermissions
void setPermissions(PermissionSet permissionSet)
Set the permission that are part of this role- Parameters:
permissionSet
- a set of permissions
-
setPermissionsAsSet
<T extends Permission> void setPermissionsAsSet(Set<T> permissions)
Set the permission that are part of this role as Set- Parameters:
permissions
- a set of permissions
-
addPermission
void addPermission(Permission permission)
This method should only be used by a RoleManager. Not directly.- Parameters:
permission
- the Permission to add
-
removePermission
void removePermission(Permission permission)
This method should only be used by a RoleManager. Not directly.- Parameters:
permission
- the Permission to remove
-
setGroups
void setGroups(GroupSet groups)
Set the groups this role belongs to- Parameters:
groups
- the set of groups
-
removeGroup
void removeGroup(Group group)
This method should only be used by a RoleManager. Not directly.- Parameters:
group
- the Group to remove
-
addGroup
void addGroup(Group group)
This method should only be used by a RoleManager. Not directly.- Parameters:
group
- the Group to add
-
setGroupsAsSet
<T extends Group> void setGroupsAsSet(Set<T> groups)
Set the groups this role belongs to as a Set- Parameters:
groups
- the set of groups
-
getGroupsAsSet
<T extends Group> Set<T> getGroupsAsSet()
Get the groups this role belongs to as a Set- Returns:
- a set of groups
-
-