Package com.alpaca.service
Interface IRoleService
- All Superinterfaces:
IGenericService<Role,UUID>
- All Known Implementing Classes:
RoleServiceImpl
Service interface for managing
Role entities. Extends IGenericService to inherit
common CRUD operations.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfindByRoleName(String roleName) Finds a role by its name.Retrieves the set of roles assigned to the current user.Methods inherited from interface com.alpaca.service.IGenericService
deleteById, existsAllByIds, existsById, existsByUniqueProperties, findAll, findAllByIds, findAllByIdsToSet, findAllPage, findById, save, saveAll, updateById
-
Method Details
-
findByRoleName
Finds a role by its name.- Parameters:
roleName- The name of the role - must not be null.- Returns:
- The
Roleentity if found. - Throws:
BadRequestException- if the roleName is null.NotFoundException- if the entity is not found.
-
getUserRoles
Retrieves the set of roles assigned to the current user.- Returns:
- A
Setcontaining the user's roles. - Throws:
NotFoundException- if the entity is not found.
-