Package org.cyclos.utils
Class GroupHelper
- java.lang.Object
-
- org.cyclos.utils.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 Summary
Fields Modifier and Type Field Description static intNO_TRUNCATIONConstant to signal that Strings should not be truncated
-
Constructor Summary
Constructors Constructor Description GroupHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetGroupLabel(Collection<GroupVO> groups, int maxLength)Get a String as a concatenation of all group names.static StringgetMultipleUsersLabel(Collection<UserVO> users, int maxLength)Get a String as a concatenation of all user's display.
-
-
-
Field Detail
-
NO_TRUNCATION
public static final int NO_TRUNCATION
Constant to signal that Strings should not be truncated- See Also:
- Constant Field Values
-
-
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 groupsmaxLength- 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 usersmaxLength- Maximum desired length of the returned String- Returns:
- representation of all user names
-
-