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:
  • Constructor Details

    • DynamicPermissionImpl

      public DynamicPermissionImpl()
  • Method Details

    • getRoles

      public RoleSet getRoles()
      Get the roles that this permission belongs to
      Specified by:
      getRoles in interface DynamicPermission
      Returns:
      a set of roles
    • setRoles

      public void setRoles(RoleSet roleSet)
      Set the roles that this permission belongs to
      Specified by:
      setRoles in interface DynamicPermission
      Parameters:
      roleSet - a set of roles
    • addRole

      public void addRole(Role role)
      Add a role to this permission
      Specified by:
      addRole in interface DynamicPermission
      Parameters:
      role - the role to add
    • removeRole

      public void removeRole(Role role)
      Remove a role from this permission
      Specified by:
      removeRole in interface DynamicPermission
      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:
      setRolesAsSet in interface DynamicPermission
      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:
      getRolesAsSet in interface DynamicPermission
      Returns:
      a set of roles