Package de.xima.fc.user_portal.common
Class UserPortalUtils
- java.lang.Object
-
- de.xima.fc.user_portal.common.UserPortalUtils
-
public class UserPortalUtils extends Object
This class provides utility methods for the user portal.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description UserPortalUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<IUserPortalChatEntryViewModel>createMessages(List<de.xima.fc.api.rest.pub.client.form_record.model.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 StringurlToPath(String urlString)
-
-
-
Method Detail
-
createMessages
public static List<IUserPortalChatEntryViewModel> createMessages(List<de.xima.fc.api.rest.pub.client.form_record.model.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.
-
determineIfUserHasFormRecords
public static boolean determineIfUserHasFormRecords(IUserPortalInvocationContext upc, IUserPortalUser user, UUID portalUuid)
-
getNumberOfUnreadMessages
public static int getNumberOfUnreadMessages(IUserPortalInvocationContext upc, UUID portalUuid)
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
-
-