Interface GroupColor
- All Known Implementing Classes:
GroupColorProvider
Group color interface to manage group color.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateGroup(int executorId, int groupId) Creates a new group entry in the database with the provided user and group IDs.voidcreateGroup(int executorId, int groupId, String chatPrefix, String chatSuffix, String chatColor, String tabPrefix, String tabSuffix, String tabColor, String teamPrefix, String teamSuffix, String teamColor) Creates a new group with detailed customization options for chat, tab, and team settings.voiddeleteGroup(int groupId) Deletes the group with the specified group ID from the database.booleanexistsGroup(int groupId) Checks if a group with the specified group ID exists in the database.getColor(int groupId, GroupColorType type) Retrieves the color associated with the specified group and group color type.getCreatedAt(int groupId) Retrieves the creation timestamp of the group with the specified group ID.intgetCreatedBy(int groupId) Retrieves the ID of the user who created the specified group.getModifiedAt(int groupId) Retrieves the timestamp at which the specified group was last modified.intgetModifiedBy(int groupId) Retrieves the ID of the user who last modified the group with the specified group ID.getPrefix(int groupId, GroupColorType type) Retrieves the prefix associated with the specified group and group color type.getSuffix(int groupId, GroupColorType type) Retrieves the suffix associated with the specified group and group color type.voidsetColor(int executorId, int groupId, GroupColorType type, String color) Sets the color associated with the specified group and group color type.voidsetPrefix(int executorId, int groupId, GroupColorType type, String prefix) Sets the prefix associated with the specified group and group color type.voidsetSuffix(int executorId, int groupId, GroupColorType type, String suffix) Sets the suffix associated with the specified group and group color type.
-
Method Details
-
existsGroup
boolean existsGroup(int groupId) Checks if a group with the specified group ID exists in the database.- Parameters:
groupId- The unique identifier of the group to be checked- Returns:
- True if the group exists, false otherwise
-
createGroup
void createGroup(int executorId, int groupId) Creates a new group entry in the database with the provided user and group IDs. If the group already exists, the method returns without taking any action.- Parameters:
executorId- The unique identifier of the user initiating the group creationgroupId- The unique identifier of the group to be created
-
createGroup
void createGroup(int executorId, int groupId, String chatPrefix, String chatSuffix, String chatColor, String tabPrefix, String tabSuffix, String tabColor, String teamPrefix, String teamSuffix, String teamColor) Creates a new group with detailed customization options for chat, tab, and team settings. If the group with the specified groupId already exists, no action is taken.- Parameters:
executorId- The unique identifier of the user initiating the group creation.groupId- The unique identifier of the group to be created.chatPrefix- The prefix to be used for chat messages.chatSuffix- The suffix to be used for chat messages.chatColor- The color code to be applied to chat messages.tabPrefix- The prefix to be displayed in the tab list.tabSuffix- The suffix to be displayed in the tab list.tabColor- The color code to be applied to the tab list.teamPrefix- The prefix to be used for team names.teamSuffix- The suffix to be used for team names.teamColor- The color code to be applied to team names.
-
deleteGroup
void deleteGroup(int groupId) Deletes the group with the specified group ID from the database. This operation is performed by the user with the given user ID.- Parameters:
groupId- The unique identifier of the group to be deleted.
-
getPrefix
Retrieves the prefix associated with the specified group and group color type.- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The prefix string associated with the specified group and type.
-
getSuffix
Retrieves the suffix associated with the specified group and group color type.- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The suffix string associated with the specified group and type.
-
getColor
Retrieves the color associated with the specified group and group color type.- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The color string associated with the specified group and type.
-
setPrefix
Sets the prefix associated with the specified group and group color type.- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose prefix is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).prefix- The prefix string to be set for the specified group and type.
-
setSuffix
Sets the suffix associated with the specified group and group color type.- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose suffix is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).suffix- The suffix string to be set for the specified group and type.
-
setColor
Sets the color associated with the specified group and group color type.- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose color is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).color- The color string to be set for the specified group and type.
-
getCreatedBy
int getCreatedBy(int groupId) Retrieves the ID of the user who created the specified group.- Parameters:
groupId- The unique identifier of the group whose creator ID is to be retrieved.- Returns:
- The unique identifier of the user who created the group.
-
getCreatedAt
Retrieves the creation timestamp of the group with the specified group ID.- Parameters:
groupId- The unique identifier of the group whose creation timestamp is to be retrieved.- Returns:
- The creation timestamp of the specified group, or null if the group does not exist.
-
getModifiedBy
int getModifiedBy(int groupId) Retrieves the ID of the user who last modified the group with the specified group ID.- Parameters:
groupId- The unique identifier of the group whose last modifier is to be retrieved.- Returns:
- The unique identifier of the user who last modified the group.
-
getModifiedAt
Retrieves the timestamp at which 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.
-