Interface PermissionService

All Known Implementing Classes:
PermissionServiceImpl

public interface PermissionService
  • Method Details

    • definePermission

      Permission definePermission(String name, String description, PermissionGroup group)
      Ensures a permission with the given name and description exists. The name is the unique identifier of the permission.
      Parameters:
      name - Unique name of the permission.
      description - Description of the permission.
      group - Group for the permission.
      Returns:
      Permission instance that was created or updated.
    • definePermission

      Permission definePermission(String name, String description, String groupName)
      Ensures a permission with the given name and description exists. The name is the unique identifier of the permission.
      Parameters:
      name - Unique name of the permission.
      description - Description of the permission.
      groupName - Name of the permission group the permission should be linked to.
      Returns:
      Permission instance that was created or update
    • definePermission

      Permission definePermission(Permission permission)
      Ensures the given permission exists based on the unique name.
      Parameters:
      permission - Permission entity that should exist.
    • getPermissionGroups

      Collection<PermissionGroup> getPermissionGroups()
      Get all defined permission groups.
      Returns:
      Collection of PermissionGroup entities.
    • getPermissionGroup

      PermissionGroup getPermissionGroup(String name)
      Get the PermissionGroup entity by name.
      Parameters:
      name - Unique name of the permission group.
      Returns:
      PermissionGroup entity of null.
    • saveGroup

      Save the PermissionGroup entity.
      Parameters:
      dto - Entity to save.
      Returns:
      Persisted entity.
    • deleteGroup

      void deleteGroup(PermissionGroup group)
      Delete the PermissionGroup entity.
      Parameters:
      group - Entity to delete.
    • getPermissions

      Collection<Permission> getPermissions()
      Get all defined permissions.
      Returns:
      Collection of Permission entities.
    • getPermission

      Permission getPermission(String name)
      Get the Permission entity by name.
      Parameters:
      name - Unique name of the permission.
      Returns:
      Permission entity of null.
    • savePermission

      Permission savePermission(Permission permission)
      Save the Permission entity.
      Parameters:
      permission - Entity to save.
    • deletePermission

      void deletePermission(Permission permission)
      Delete the Permission entity.
      Parameters:
      permission - Entity to delete.