Class UserPortalUtils


  • public class UserPortalUtils
    extends Object
    This class provides utility methods for the user portal.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • UserPortalUtils

        public UserPortalUtils()
    • 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.
      • getInitials

        public static String getInitials​(String name)
      • urlToPath

        public static String urlToPath​(String urlString)
      • getLoginUrl

        public static String getLoginUrl​(String restUrl)
      • 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 context
        portalUuid - the UUID of the user portal
        Returns:
        the number of unread messages, or 0 if none are found