Class GroupHelper


  • public class GroupHelper
    extends Object
    This class contains some functions for helping format data on groups. It's also used, for convenience, for groups of users (not cyclos Groups).
    • Field Detail

      • NO_TRUNCATION

        public static final int NO_TRUNCATION
        Constant to signal that Strings should not be truncated
        See Also:
        Constant Field Values
    • Constructor Detail

      • GroupHelper

        public GroupHelper()
    • Method Detail

      • getGroupLabel

        public static String getGroupLabel​(Collection<GroupVO> groups,
                                           int maxLength)
        Get a String as a concatenation of all group names. If maxLength > 0, the String will be truncated to maxLength.
        Parameters:
        groups - Collection of groups
        maxLength - Maximum desired length of the returned String
        Returns:
        String representation of all group names
      • getMultipleUsersLabel

        public static String getMultipleUsersLabel​(Collection<UserVO> users,
                                                   int maxLength)
        Get a String as a concatenation of all user's display. If maxLength > 0, the String will be truncated to maxLength.
        Parameters:
        users - Collection of all users
        maxLength - Maximum desired length of the returned String
        Returns:
        representation of all user names