Interface DynamicRole
- All Superinterfaces:
Role,SecurityEntity,Serializable
- All Known Implementing Classes:
DynamicRoleImpl
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
Modifier and TypeMethodDescriptionvoidThis method should only be used by a RoleManager.voidaddPermission(Permission permission) This method should only be used by a RoleManager.Get the groups this role belongs toGet the groups this role belongs to as a SetGet the permission that are part of this role<T extends Permission>
Set<T> 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.voidSet 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 interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
Method Details
-
getPermissions
PermissionSet getPermissions()Get the permission that are part of this role- Returns:
- a set of permissions
-
getPermissionsAsSet
Get the permission that are part of this role as Set- Returns:
- a set of permissions
-
setPermissions
Set the permission that are part of this role- Parameters:
permissionSet- a set of permissions
-
setPermissionsAsSet
Set the permission that are part of this role as Set- Parameters:
permissions- a set of permissions
-
addPermission
This method should only be used by a RoleManager. Not directly.- Parameters:
permission- the Permission to add
-
removePermission
This method should only be used by a RoleManager. Not directly.- Parameters:
permission- the Permission to remove
-
getGroups
GroupSet getGroups()Get the groups this role belongs to- Returns:
- a set of groups
-
setGroups
Set the groups this role belongs to- Parameters:
groups- the set of groups
-
removeGroup
This method should only be used by a RoleManager. Not directly.- Parameters:
group- the Group to remove
-
addGroup
This method should only be used by a RoleManager. Not directly.- Parameters:
group- the Group to add
-
setGroupsAsSet
Set the groups this role belongs to as a Set- Parameters:
groups- the set of groups
-
getGroupsAsSet
Get the groups this role belongs to as a Set- Returns:
- a set of groups
-