Interface DynamicPermission

All Superinterfaces:
Permission, SecurityEntity, Serializable
All Known Implementing Classes:
DynamicPermissionImpl

public interface DynamicPermission
extends Permission
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 1374616 2012-08-18 17:26:07Z tv $
Author:
Eric Pugh
  • Method Summary

    Modifier and Type Method Description
    void addRole​(Role role)
    Add a role to this permission
    RoleSet getRoles()
    Get the roles that this permission belongs to
    <T extends Role>
    Set<T>
    getRolesAsSet()
    Get the roles that this permission belongs to as Set
    void removeRole​(Role role)
    Remove a role from this permission
    void setRoles​(RoleSet roleSet)
    Set the roles that this permission belongs to
    <T extends Role>
    void
    setRolesAsSet​(Set<T> roles)
    Set the roles that this permission belongs to as Set

    Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity

    getId, getName, setId, setName
  • Method Details

    • getRoles

      RoleSet getRoles()
      Get the roles that this permission belongs to
      Returns:
      a set of roles
    • setRoles

      void setRoles​(RoleSet roleSet)
      Set the roles that this permission belongs to
      Parameters:
      roleSet - a set of roles
    • addRole

      void addRole​(Role role)
      Add a role to this permission
      Parameters:
      role - the role to add
    • removeRole

      void removeRole​(Role role)
      Remove a role from this permission
      Parameters:
      role - the role to remove
    • setRolesAsSet

      <T extends Role> void setRolesAsSet​(Set<T> roles)
      Set the roles that this permission belongs to as Set
      Parameters:
      roles - a set of roles
    • getRolesAsSet

      <T extends Role> Set<T> getRolesAsSet()
      Get the roles that this permission belongs to as Set
      Returns:
      a set of roles