Class UserPortalUtils
java.lang.Object
de.xima.fc.user_portal.common.UserPortalUtils
This class provides utility methods for the user portal.
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<IUserPortalChatEntryViewModel> createMessages(List<BaseFormRecordMessageResource> messages) Creates a list of message models from a list of message resources.static booleandetermineIfUserHasFormRecords(IUserPortalInvocationContext upc, IUserPortalUser user, UUID portalUuid) static StringgetInitials(String name) static StringgetLoginUrl(String restUrl) static intgetNumberOfUnreadMessages(IUserPortalInvocationContext upc, UUID portalUuid) Returns the number of unread messages for the given user portal context and portal UUID.static String
-
Constructor Details
-
UserPortalUtils
public UserPortalUtils()
-
-
Method Details
-
createMessages
public static List<IUserPortalChatEntryViewModel> createMessages(List<BaseFormRecordMessageResource> messages) Creates a list of message models from a list of message resources.- Parameters:
messages- The list of message resources.- Returns:
- A list of message models.
-
getInitials
-
urlToPath
-
getLoginUrl
-
determineIfUserHasFormRecords
public static boolean determineIfUserHasFormRecords(IUserPortalInvocationContext upc, IUserPortalUser user, UUID portalUuid) -
getNumberOfUnreadMessages
Returns the number of unread messages for the given user portal context and portal UUID.- Parameters:
upc- the user portal invocation contextportalUuid- the UUID of the user portal- Returns:
- the number of unread messages, or 0 if none are found
-