Package de.murmelmeister.murmelapi.group
Class GroupProvider
java.lang.Object
de.murmelmeister.murmelapi.group.GroupProvider
- All Implemented Interfaces:
Group
-
Constructor Summary
Constructors -
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.static void
-
Constructor Details
-
GroupProvider
-
-
Method Details
-
setup
-
existsGroup
public boolean existsGroup(int groupId) Description copied from interface:GroupChecks if a group with the specified group ID exists.- Specified by:
existsGroupin interfaceGroup- Parameters:
groupId- The unique identifier of the group to check.- Returns:
- True if the group exists, false otherwise.
-
existsGroup
Description copied from interface:GroupChecks if a group with the specified group name exists.- Specified by:
existsGroupin interfaceGroup- Parameters:
groupName- The name of the group to check.- Returns:
- True if the group exists, false otherwise.
-
createNewGroup
Description copied from interface:GroupCreates a new group with the specified details.- Specified by:
createNewGroupin interfaceGroup- 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
public void deleteGroup(int executorId, int groupId) Description copied from interface:GroupDeletes a group with the specified group ID.- Specified by:
deleteGroupin interfaceGroup- Parameters:
executorId- The unique identifier of the user performing the deletion.groupId- The unique identifier of the group to be deleted.
-
getUniqueId
Description copied from interface:GroupRetrieves the unique identifier for the specified group name.- Specified by:
getUniqueIdin interfaceGroup- 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
Description copied from interface:GroupRetrieves the name of the group associated with the specified group ID. -
rename
Description copied from interface:GroupRenames the specified group to a new name. -
getUniqueIds
Description copied from interface:GroupRetrieves a list of unique identifiers for the groups.- Specified by:
getUniqueIdsin interfaceGroup- Returns:
- A list of integers representing the unique identifiers for the groups.
-
getNames
Description copied from interface:GroupRetrieves a list of names associated with the groups. -
getPriority
public int getPriority(int groupId) Description copied from interface:GroupRetrieves the priority level assigned to a group specified by its unique identifier.- Specified by:
getPriorityin interfaceGroup- 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
public void setPriority(int executorId, int groupId, int priority) Description copied from interface:GroupUpdates the priority level of a specified group.- Specified by:
setPriorityin interfaceGroup- 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
Description copied from interface:GroupRetrieves the team sort value associated with the specified group ID.- Specified by:
getTeamSortin interfaceGroup- 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
Description copied from interface:GroupSets the team sort order for the specified group.- Specified by:
setTeamSortin interfaceGroup- 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
public int getCreatedBy(int groupId) Description copied from interface:GroupRetrieves the unique identifier of the user who created the specified group.- Specified by:
getCreatedByin interfaceGroup- 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
Description copied from interface:GroupRetrieves the creation timestamp of the group specified by its unique ID.- Specified by:
getCreatedAtin interfaceGroup- 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
public int getModifiedBy(int groupId) Description copied from interface:GroupRetrieves the unique identifier of the user who last modified the group specified by its unique identifier.- Specified by:
getModifiedByin interfaceGroup- 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
Description copied from interface:GroupRetrieves the timestamp indicating when the specified group was last modified.- Specified by:
getModifiedAtin interfaceGroup- 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
Description copied from interface:GroupCreates a default group with the specified name.- Specified by:
createDefaultGroupin interfaceGroup- Parameters:
groupName- The name of the group to be created.
-
loadExpired
public void loadExpired()Description copied from interface:GroupLoads 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.- Specified by:
loadExpiredin interfaceGroup
-
getColor
Description copied from interface:GroupRetrieves the color information associated with a group. -
getParent
Description copied from interface:GroupRetrieves the parent information associated with the group. -
getPermission
Description copied from interface:GroupRetrieves the permission details associated with the group.- Specified by:
getPermissionin interfaceGroup- Returns:
- An instance of
GroupPermissionrepresenting the permission configuration of the group.
-