Package mops.businesslogic.group
Interface GroupService
-
- All Known Implementing Classes:
GroupServiceImpl
@Service public interface GroupServiceConnects to our group database repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteGroup(long groupId)Delete the given group.java.util.Optional<Group>findGroupByGroupId(java.util.UUID groupId)Get a group by its group uuid.java.util.List<Group>getAllGroups()Fetches all groups.DirectoryPermissionsgetDefaultPermissions(long groupId)Creates the default permissions.GroupgetGroup(long groupId)Get a group by id.java.util.Set<java.lang.String>getRoles(long groupId)Gets all roles that exist in a group.longgetTotalGroupCount()Get the total number of groups.java.util.List<Group>getUserGroups(Account account)Fetches all visible groups of one user.GroupsaveGroup(Group group)Save the given group.
-
-
-
Method Detail
-
getRoles
java.util.Set<java.lang.String> getRoles(long groupId) throws MopsExceptionGets all roles that exist in a group.- Parameters:
groupId- the id of the group- Returns:
- gets all roles of that group
- Throws:
MopsException
-
getAllGroups
java.util.List<Group> getAllGroups() throws MopsException
Fetches all groups.- Returns:
- a list of groups
- Throws:
MopsException
-
getUserGroups
java.util.List<Group> getUserGroups(Account account) throws MopsException
Fetches all visible groups of one user.- Parameters:
account- the account the user- Returns:
- a list of groups
- Throws:
MopsException
-
getDefaultPermissions
DirectoryPermissions getDefaultPermissions(long groupId)
Creates the default permissions.- Parameters:
groupId- group id- Returns:
- default directory permissions
-
getGroup
Group getGroup(long groupId) throws MopsException
Get a group by id.- Parameters:
groupId- group id- Returns:
- group
- Throws:
MopsException
-
findGroupByGroupId
java.util.Optional<Group> findGroupByGroupId(java.util.UUID groupId) throws MopsException
Get a group by its group uuid.- Parameters:
groupId- group uuid- Returns:
- group
- Throws:
MopsException
-
saveGroup
Group saveGroup(Group group) throws MopsException
Save the given group.- Parameters:
group- group to be saved- Returns:
- saved group
- Throws:
MopsException
-
deleteGroup
void deleteGroup(long groupId) throws MopsExceptionDelete the given group.- Parameters:
groupId- id of the group to be deleted- Throws:
MopsException
-
getTotalGroupCount
long getTotalGroupCount() throws MopsExceptionGet the total number of groups.- Returns:
- group count
- Throws:
MopsException
-
-