Interface PermissionService
- All Known Implementing Classes:
- PermissionServiceImpl
public interface PermissionService
- 
Method SummaryModifier and TypeMethodDescriptiondefinePermission(Permission permission) Ensures the given permission exists based on the unique name.definePermission(String name, String description, PermissionGroup group) Ensures a permission with the given name and description exists.definePermission(String name, String description, String groupName) Ensures a permission with the given name and description exists.voiddeleteGroup(PermissionGroup group) Delete the PermissionGroup entity.voiddeletePermission(Permission permission) Delete the Permission entity.getPermission(String name) Get the Permission entity by name.getPermissionGroup(String name) Get the PermissionGroup entity by name.Get all defined permission groups.Get all defined permissions.saveGroup(PermissionGroup dto) Save the PermissionGroup entity.savePermission(Permission permission) Save the Permission entity.
- 
Method Details- 
definePermissionEnsures 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.
 
- 
definePermissionEnsures 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
 
- 
definePermissionEnsures the given permission exists based on the unique name.- Parameters:
- permission- Permission entity that should exist.
 
- 
getPermissionGroupsCollection<PermissionGroup> getPermissionGroups()Get all defined permission groups.- Returns:
- Collection of PermissionGroup entities.
 
- 
getPermissionGroupGet the PermissionGroup entity by name.- Parameters:
- name- Unique name of the permission group.
- Returns:
- PermissionGroup entity of null.
 
- 
saveGroupSave the PermissionGroup entity.- Parameters:
- dto- Entity to save.
- Returns:
- Persisted entity.
 
- 
deleteGroupDelete the PermissionGroup entity.- Parameters:
- group- Entity to delete.
 
- 
getPermissionsCollection<Permission> getPermissions()Get all defined permissions.- Returns:
- Collection of Permission entities.
 
- 
getPermissionGet the Permission entity by name.- Parameters:
- name- Unique name of the permission.
- Returns:
- Permission entity of null.
 
- 
savePermissionSave the Permission entity.- Parameters:
- permission- Entity to save.
 
- 
deletePermissionDelete the Permission entity.- Parameters:
- permission- Entity to delete.
 
 
-