Class UserUtil


  • public class UserUtil
    extends Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Stream<org.kie.server.services.taskassigning.user.system.api.User> filterDuplicates​(Collection<org.kie.server.services.taskassigning.user.system.api.User> externalUsers)
      Given a Collection of external users, normally returned by the UserSystemService, produces the filtering of the elements with the following criteria: 1) Null elements are removed from the result. 2) Duplicate users are removed from the result.
      static org.kie.server.services.taskassigning.core.model.User fromExternalUser​(org.kie.server.services.taskassigning.user.system.api.User externalUser)  
      static boolean isUser​(String userType)  
    • Method Detail

      • fromExternalUser

        public static org.kie.server.services.taskassigning.core.model.User fromExternalUser​(org.kie.server.services.taskassigning.user.system.api.User externalUser)
      • isUser

        public static boolean isUser​(String userType)
      • filterDuplicates

        public static Stream<org.kie.server.services.taskassigning.user.system.api.User> filterDuplicates​(Collection<org.kie.server.services.taskassigning.user.system.api.User> externalUsers)
        Given a Collection of external users, normally returned by the UserSystemService, produces the filtering of the elements with the following criteria: 1) Null elements are removed from the result. 2) Duplicate users are removed from the result. Since the external users implementation is unknown and the identifier of a user is the "id", two users are considered to be the same if they have the same "id". Meaning that if two users with the same "id" are encountered only one instance will be included in the result, typically the first instance found.
        Parameters:
        externalUsers - a collection with the external users to filter.
        Returns:
        a Stream with the filtered users.