Class DynamicPermissionImpl
java.lang.Object
org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
org.apache.fulcrum.security.model.dynamic.entity.impl.DynamicPermissionImpl
- All Implemented Interfaces:
Serializable,Permission,SecurityEntity,DynamicPermission
public class DynamicPermissionImpl extends SecurityEntityImpl implements DynamicPermission
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: DynamicPermission.java 223059 2004-07-07 16:49:09Z epugh $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DynamicPermissionImpl() -
Method Summary
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 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
-
DynamicPermissionImpl
public DynamicPermissionImpl()
-
-
Method Details
-
getRoles
Get the roles that this permission belongs to- Specified by:
getRolesin interfaceDynamicPermission- Returns:
- a set of roles
-
setRoles
Set the roles that this permission belongs to- Specified by:
setRolesin interfaceDynamicPermission- Parameters:
roleSet- a set of roles
-
addRole
Add a role to this permission- Specified by:
addRolein interfaceDynamicPermission- Parameters:
role- the role to add
-
removeRole
Remove a role from this permission- Specified by:
removeRolein interfaceDynamicPermission- Parameters:
role- the role to remove
-
setRolesAsSet
Set the roles that this permission belongs to as Set- Specified by:
setRolesAsSetin interfaceDynamicPermission- Parameters:
roles- a set of roles
-
getRolesAsSet
Get the roles that this permission belongs to as Set- Specified by:
getRolesAsSetin interfaceDynamicPermission- Returns:
- a set of roles
-