Class UserGroupUpdater


  • public class UserGroupUpdater
    extends Object
    Represents a database updater for user groups.
    Author:
    Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    • Method Detail

      • createUserGroup

        public void createUserGroup​(@NotNull
                                    String key,
                                    @NotNull
                                    String name,
                                    @NotNull
                                    String description)
        Inserts a user group to the database.

        Note: clients are responsible to pass correct values.

        Parameters:
        key - group key
        name - group name
        description - group description
      • deleteUserGroup

        public void deleteUserGroup​(@NotNull
                                    String key)
        Deletes a user group from the database.
        Parameters:
        key - group key
      • updateUserGroup

        public boolean updateUserGroup​(@NotNull
                                       UserGroup userGroup,
                                       @NotNull
                                       Supplier<Boolean> updateFunction)
      • updateUserGroup

        public void updateUserGroup​(@NotNull
                                    String key,
                                    @NotNull
                                    String name,
                                    @NotNull
                                    String description)
        Updates a user group with new name and description.

        Note: clients are responsible to pass correct values.

        Parameters:
        key - group key
        name - group name
        description - group description