Interface MutablePermissionTree

All Superinterfaces:
PermissionTree

public interface MutablePermissionTree extends PermissionTree
A mutable permission tree.
  • Method Details

    • create

      static MutablePermissionTree create()
      Creates a new mutable permission tree.
    • setPermission

      default void setPermission(String permission, boolean state)
      Sets the permission with the given state.
      Parameters:
      permission - the permission
      state - the state
    • setPermission

      void setPermission(String permission, boolean state, boolean override)
      Sets the permission with the given state.
      Parameters:
      permission - the permission
      state - the state
      override - whether to override the child permissions with the new state
    • setPermissions

      default void setPermissions(PermissionTree tree)
      Sets the permissions from the given permission tree.
      Parameters:
      tree - the permission tree
    • setPermissions

      default void setPermissions(PermissionTree tree, boolean override)
      Sets the permissions from the given permission tree.
      Parameters:
      tree - the permission tree
      override - whether to override the child permissions with the new state
    • removePermission

      default void removePermission(String permission)
      Removes the given permission from the tree. Essentially making it TriState.UNDEFINED.
      Parameters:
      permission - the permission
    • removePermission

      void removePermission(String permission, boolean all)
    • clearPermissions

      default void clearPermissions()
      Clears all permissions.