Interface Group

All Known Implementing Classes:
GroupProvider

public sealed interface Group permits GroupProvider
Group interface to manage groups.
  • 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

      boolean existsGroup(String name)
      Checks if a group exists.
      Parameters:
      name - The name of the group.
      Returns:
      True if the group exists, otherwise false.
    • createNewGroup

      void createNewGroup(String name, int creatorId, int sortId, String teamId)
      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

      int getUniqueId(String name)
      Obtains the unique id of a group.
      Parameters:
      name - The name of the group.
      Returns:
      The unique id of the group.
    • getName

      String getName(int id)
      Obtains the name of a group.
      Parameters:
      id - The id of the group.
      Returns:
      The name of the group.
    • rename

      void rename(int id, String newName)
      Renames a group.
      Parameters:
      id - The id of the group.
      newName - The new name of the group.
    • rename

      void rename(String oldName, String newName)
      Renames a group.
      Parameters:
      oldName - The old name of the group.
      newName - The new name of the group.
    • getUniqueIds

      List<Integer> getUniqueIds()
      Obtains a list of all unique ids of the groups.
      Returns:
      A list of all unique ids of the groups.
    • getNames

      List<String> 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.