Package de.murmelmeister.murmelapi.group
Interface Group
- All Known Implementing Classes:
GroupProvider
Group interface to manage groups.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateNewGroup(String name, int creatorId, int sortId, String teamId) Creates a new group and checks if the group already exists.voiddeleteGroup(int id) Deletes a group.booleanexistsGroup(int id) Checks if a group exists.booleanexistsGroup(String name) Checks if a group exists.Obtains the color settings of a group.intObtains the default group.getName(int id) Obtains the name of a group.getNames()Obtains a list of all names of the groups.Obtains the parent of a group.Obtains the permission of a group.Obtains the settings of a group.intgetUniqueId(String name) Obtains the unique id of a group.Obtains a list of all unique ids of the groups.voidLoads all expired things.voidRenames a group.voidRenames a group.
-
Method Details
-
existsGroup
boolean existsGroup(int id) Checks if a group exists.- Parameters:
id- The id of the group.- Returns:
- True if the group exists, otherwise false.
-
existsGroup
Checks if a group exists.- Parameters:
name- The name of the group.- Returns:
- True if the group exists, otherwise false.
-
createNewGroup
Creates a new group and checks if the group already exists. If the group already exists, the method will return without creating a new group.- Parameters:
name- The name of the group.creatorId- The creator id of the group.sortId- The sort id of the group.teamId- The team id of the group.
-
deleteGroup
void deleteGroup(int id) Deletes a group.- Parameters:
id- The id of the group.
-
getUniqueId
Obtains the unique id of a group.- Parameters:
name- The name of the group.- Returns:
- The unique id of the group.
-
getName
Obtains the name of a group.- Parameters:
id- The id of the group.- Returns:
- The name of the group.
-
rename
Renames a group.- Parameters:
id- The id of the group.newName- The new name of the group.
-
rename
Renames a group.- Parameters:
oldName- The old name of the group.newName- The new name of the group.
-
getUniqueIds
Obtains a list of all unique ids of the groups.- Returns:
- A list of all unique ids of the groups.
-
getNames
Obtains a list of all names of the groups.- Returns:
- A list of all names of the groups.
-
loadExpired
void loadExpired()Loads all expired things. -
getDefaultGroup
int getDefaultGroup()Obtains the default group. The default group is the group with the id 1. -
getSettings
GroupSettings getSettings()Obtains the settings of a group.- Returns:
- The settings of the group.
-
getColorSettings
GroupColorSettings getColorSettings()Obtains the color settings of a group.- Returns:
- The color settings of the group.
-
getParent
GroupParent getParent()Obtains the parent of a group.- Returns:
- The parent of the group.
-
getPermission
GroupPermission getPermission()Obtains the permission of a group.- Returns:
- The permission of the group.
-