Class UserFunctions


  • public class UserFunctions
    extends Object
    Various user related functions
    • Constructor Detail

      • UserFunctions

        public UserFunctions​(UserModel userModel)
    • Method Detail

      • booleanPropertyValue

        public static boolean booleanPropertyValue​(@NotNull
                                                   User user,
                                                   @NotNull
                                                   String propName)
        Returns value of boolean property from the specified user profile.
        Parameters:
        user - user
        propName - name of the property
        Returns:
        see above
      • getPropertyValue

        public static String getPropertyValue​(@NotNull
                                              User user,
                                              @NotNull
                                              String propName)
        Returns string value of property from the specified user profile.
        Parameters:
        user - user
        propName - name of the property
        Returns:
        see above
      • getAllUsers

        public static List<SUser> getAllUsers()
        Returns all users registered in the system, sorted by their names
        Returns:
        see above
      • isGuestUser

        public static boolean isGuestUser​(@NotNull
                                          User user)
        Returns true if specified user is the guest user
        Parameters:
        user - user of interest
        Returns:
        see above
      • getPreferredTheme

        @NotNull
        public static String getPreferredTheme​(@NotNull
                                               User user)
        Returns user's preferred theme (dark, light or auto)
        Parameters:
        user -
        Returns:
        Since:
        2023.05.1