Interface GroupDTO


public interface GroupDTO
Public view of a permission group belonging to a dominion.

A group's name may contain Dominion color syntax. Its privilege values are evaluated for members assigned to the group.

  • Method Details

    • getId

      @NotNull @NotNull Integer getId()
      Gets the ID of the group.
      Returns:
      the ID of the group
    • getDomID

      @NotNull @NotNull Integer getDomID()
      Gets the ID of the dominion to which the group belongs.
      Returns:
      the ID of the dominion
    • setName

      @NotNull @NotNull GroupDTO setName(@NotNull @NotNull String name) throws SQLException
      Sets the name of the group. The name may include Dominion color codes.
      Parameters:
      name - the name of the group
      Returns:
      this group after the name has been updated
      Throws:
      SQLException - if a database access error occurs
    • getNamePlain

      @NotNull @NotNull String getNamePlain()
      Gets the name of the group in plain text (without color codes). This method should be used in most cases to get the group name.
      Returns:
      the plain text name of the group
    • getNameRaw

      @NotNull @NotNull String getNameRaw()
      Gets the raw name of the group, including Dominion color codes.
      Returns:
      the raw name of the group
    • getNameColoredComponent

      @NotNull @NotNull net.kyori.adventure.text.Component getNameColoredComponent()
      Gets the formatted group title as an Adventure Component.
      Returns:
      the formatted group title
    • getNameColoredBukkit

      @NotNull @NotNull String getNameColoredBukkit()
      Gets the formatted group title as a Bukkit legacy color-code string.
      Returns:
      the formatted group title
    • getFlagValue

      @NotNull @NotNull Boolean getFlagValue(@NotNull @NotNull PriFlag flag)
      Gets the value of a specific flag for the group.
      Parameters:
      flag - the flag
      Returns:
      the value of the flag, or the default value if the flag does not exist
    • getFlagsValue

      @NotNull @NotNull Map<PriFlag,Boolean> getFlagsValue()
      Gets all flag values for the group.
      Returns:
      a map of flag values
    • setFlagValue

      @NotNull @NotNull GroupDTO setFlagValue(@NotNull @NotNull PriFlag flag, @NotNull @NotNull Boolean value) throws SQLException
      Sets the value of a specific privilege flag for the group.
      Parameters:
      flag - the flag
      value - the value of the flag
      Returns:
      this group after the flag has been updated
      Throws:
      SQLException - if a database access error occurs
    • getMembers

      List<MemberDTO> getMembers() throws SQLException
      Gets all members of the group.
      Returns:
      a list of members
      Throws:
      SQLException - if a database access error occurs