Interface DefaultSynchronizedPermissionManagement

    • Method Detail

      • deleteUser

        default boolean deleteUser​(@NotNull
                                   @NotNull java.lang.String name)
        Description copied from interface: IPermissionManagement
        Deletes all users in the database matching the given name. This method is case-sensitive.
        Specified by:
        deleteUser in interface IPermissionManagement
        Parameters:
        name - the name of the users to be deleted
      • containsUser

        default boolean containsUser​(@NotNull
                                     @NotNull java.util.UUID uniqueId)
        Description copied from interface: IPermissionManagement
        Checks if a user with the given uniqueId is stored in the database.
        Specified by:
        containsUser in interface IPermissionManagement
        Parameters:
        uniqueId - the uniqueId of the user
        Returns:
        true if there is a user with that uniqueId, false otherwise
      • containsUser

        default boolean containsUser​(@NotNull
                                     @NotNull java.lang.String name)
        Description copied from interface: IPermissionManagement
        Checks if at least one user with the given name is stored in the database. This method is case-sensitive.
        Specified by:
        containsUser in interface IPermissionManagement
        Parameters:
        name - the name of the user
        Returns:
        true if there is a user with that name, false otherwise
      • getUser

        @Nullable
        default @Nullable IPermissionUser getUser​(@NotNull
                                                  @NotNull java.util.UUID uniqueId)
        Description copied from interface: IPermissionManagement
        Gets a user with the given uniqueId out of the database.
        Specified by:
        getUser in interface IPermissionManagement
        Parameters:
        uniqueId - the uniqueId of the user
        Returns:
        the IPermissionUser from the database or null if there is no user with that uniqueId stored
      • getUsers

        @NotNull
        default @NotNull java.util.List<IPermissionUser> getUsers​(@NotNull
                                                                  @NotNull java.lang.String name)
        Description copied from interface: IPermissionManagement
        Gets a list of all users with the given name out of the database. This can only return null when the connection to the database (or when it is executed in a Wrapper instance the connection to the cloud) times out.
        Specified by:
        getUsers in interface IPermissionManagement
        Parameters:
        name - the name of the users
        Returns:
        a list of all IPermissionUsers stored in the database or an empty list if there is no user with that name stored.
      • getUsers

        default java.util.Collection<IPermissionUser> getUsers()
        Description copied from interface: IPermissionManagement
        Gets a list of all users stored in the database. This can only return null when the connection to the database (or when it is executed in a Wrapper instance the connection to the cloud) times out.

        This method shouldn't be used when there are many users stored in the database, because that takes a lot of memory.

        Specified by:
        getUsers in interface IPermissionManagement
        Returns:
        a list of all IPermissionUsers stored in the database or an empty list if there is no user with that name stored.
      • getUsersByGroup

        default java.util.Collection<IPermissionUser> getUsersByGroup​(@NotNull
                                                                      @NotNull java.lang.String group)
        Description copied from interface: IPermissionManagement
        Gets a list of all users stored in the database with the given group. This can only return null when the connection to the database (or when it is executed in a Wrapper instance the connection to the cloud) times out.

        This method shouldn't be used when there are many users with that group stored in the database, because that takes a lot of memory.

        Specified by:
        getUsersByGroup in interface IPermissionManagement
        Returns:
        a list of all IPermissionUsers stored in the database or an empty list if there is no user with that name stored.
      • deleteGroup

        default void deleteGroup​(@NotNull
                                 @NotNull java.lang.String name)
        Description copied from interface: IPermissionManagement
        Deletes a group by its name out of the list of groups. If a group with that name doesn't exist, nothing happens.
        Specified by:
        deleteGroup in interface IPermissionManagement
        Parameters:
        name - the case-sensitive name of the group
      • containsGroup

        default boolean containsGroup​(@NotNull
                                      @NotNull java.lang.String group)
        Description copied from interface: IPermissionManagement
        Checks if a specific group exists.
        Specified by:
        containsGroup in interface IPermissionManagement
        Parameters:
        group - the case-sensitive name of the group
        Returns:
        true if the group exists, false otherwise