Package de.murmelmeister.murmelapi.group
Interface Group
- All Known Implementing Classes:
GroupProvider
Group interface to manage groups.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDefaultGroup(String groupName) Creates a default group with the specified name.voidcreateNewGroup(String groupName, int createdBy, int priority, String teamId) Creates a new group with the specified details.voiddeleteGroup(int executorId, int groupId) Deletes a group with the specified group ID.booleanexistsGroup(int groupId) Checks if a group with the specified group ID exists.booleanexistsGroup(String groupName) Checks if a group with the specified group name exists.getColor()Retrieves the color information associated with a group.getCreatedAt(int groupId) Retrieves the creation timestamp of the group specified by its unique ID.intgetCreatedBy(int groupId) Retrieves the unique identifier of the user who created the specified group.getModifiedAt(int groupId) Retrieves the timestamp indicating when the specified group was last modified.intgetModifiedBy(int groupId) Retrieves the unique identifier of the user who last modified the group specified by its unique identifier.getName(int groupId) Retrieves the name of the group associated with the specified group ID.getNames()Retrieves a list of names associated with the groups.Retrieves the parent information associated with the group.Retrieves the permission details associated with the group.intgetPriority(int groupId) Retrieves the priority level assigned to a group specified by its unique identifier.getTeamSort(int groupId) Retrieves the team sort value associated with the specified group ID.intgetUniqueId(String groupName) Retrieves the unique identifier for the specified group name.Retrieves a list of unique identifiers for the groups.voidLoads expired group data for processing or further operations.voidRenames the specified group to a new name.voidsetPriority(int executorId, int groupId, int priority) Updates the priority level of a specified group.voidsetTeamSort(int executorId, int groupId, String teamSort) Sets the team sort order for the specified group.
-
Method Details
-
existsGroup
boolean existsGroup(int groupId) Checks if a group with the specified group ID exists.- Parameters:
groupId- The unique identifier of the group to check.- Returns:
- True if the group exists, false otherwise.
-
existsGroup
Checks if a group with the specified group name exists.- Parameters:
groupName- The name of the group to check.- Returns:
- True if the group exists, false otherwise.
-
createNewGroup
Creates a new group with the specified details.- Parameters:
groupName- The name of the new group to be created.createdBy- The ID of the user creating the group.priority- The priority level of the group.teamId- The ID of the team to which the group belongs.
-
deleteGroup
void deleteGroup(int executorId, int groupId) Deletes a group with the specified group ID.- Parameters:
executorId- The unique identifier of the user performing the deletion.groupId- The unique identifier of the group to be deleted.
-
getUniqueId
Retrieves the unique identifier for the specified group name.- Parameters:
groupName- The name of the group whose unique identifier is to be retrieved.- Returns:
- The unique identifier associated with the specified group name.
-
getName
Retrieves the name of the group associated with the specified group ID.- Parameters:
groupId- The unique identifier of the group whose name is to be retrieved.- Returns:
- The name of the group corresponding to the provided group ID.
-
rename
Renames the specified group to a new name.- Parameters:
executorId- The unique identifier of the user performing the rename operation.groupId- The unique identifier of the group to be renamed.newName- The new name for the group.
-
getUniqueIds
Retrieves a list of unique identifiers for the groups.- Returns:
- A list of integers representing the unique identifiers for the groups.
-
getNames
Retrieves a list of names associated with the groups.- Returns:
- A list of strings representing the names of the groups.
-
getPriority
int getPriority(int groupId) Retrieves the priority level assigned to a group specified by its unique identifier.- Parameters:
groupId- The unique identifier of the group whose priority is to be retrieved.- Returns:
- The priority level of the specified group as an integer.
-
setPriority
void setPriority(int executorId, int groupId, int priority) Updates the priority level of a specified group.- Parameters:
executorId- The unique identifier of the user performing the update.groupId- The unique identifier of the group whose priority is to be set.priority- The new priority level to assign to the group.
-
getTeamSort
Retrieves the team sort value associated with the specified group ID.- Parameters:
groupId- The unique identifier of the group whose team sort value is to be retrieved.- Returns:
- The team sort value of the specified group as a string.
-
setTeamSort
Sets the team sort order for the specified group.- Parameters:
executorId- The unique identifier of the user performing the operation.groupId- The unique identifier of the group whose team sort is being set.teamSort- The new team sort value to assign to the group.
-
getCreatedBy
int getCreatedBy(int groupId) Retrieves the unique identifier of the user who created the specified group.- Parameters:
groupId- The unique identifier of the group whose creator's ID is to be retrieved.- Returns:
- The unique identifier of the user who created the specified group.
-
getCreatedAt
Retrieves the creation timestamp of the group specified by its unique ID.- Parameters:
groupId- The unique identifier of the group whose creation timestamp is to be retrieved.- Returns:
- The creation timestamp of the group as a
Timestamp.
-
getModifiedBy
int getModifiedBy(int groupId) Retrieves the unique identifier of the user who last modified the group specified by its unique identifier.- Parameters:
groupId- The unique identifier of the group whose modifier is to be retrieved.- Returns:
- The unique identifier of the user who last modified the specified group.
-
getModifiedAt
Retrieves the timestamp indicating when the specified group was last modified.- Parameters:
groupId- The unique identifier of the group whose modification timestamp is to be retrieved.- Returns:
- A
Timestampobject representing the last modification time of the specified group.
-
createDefaultGroup
Creates a default group with the specified name.- Parameters:
groupName- The name of the group to be created.
-
loadExpired
void loadExpired()Loads expired group data for processing or further operations. This method fetches and handles groups that have surpassed their expiration criteria. Typically used to manage or clean up expired group entries. -
getColor
GroupColor getColor()Retrieves the color information associated with a group.- Returns:
- An instance of
GroupColorrepresenting the color configuration of the group.
-
getParent
GroupParent getParent()Retrieves the parent information associated with the group.- Returns:
- An instance of
GroupParentrepresenting the parent configuration of the group.
-
getPermission
GroupPermission getPermission()Retrieves the permission details associated with the group.- Returns:
- An instance of
GroupPermissionrepresenting the permission configuration of the group.
-