public final class ProfileHelper extends Object
| Constructor and Description |
|---|
ProfileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static CommonProfile |
buildProfile(String typedId,
Map<String,Object> attributes)
Build a profile from a typed id and a map of attributes.
|
static CommonProfile |
buildUserProfileByClassCompleteName(String completeName)
Build a profile by its class name.
|
static <U extends CommonProfile> |
flatIntoAProfileList(LinkedHashMap<String,U> profiles)
Flat the linked hashmap of profiles into a list of profiles.
|
static <U extends CommonProfile> |
flatIntoOneProfile(LinkedHashMap<String,U> profiles)
Flat the linked hashmap of profiles into a single optional profile.
|
static boolean |
isTypedIdOf(String id,
Class<? extends CommonProfile> clazz)
Indicate if the user identifier matches this kind of profile.
|
public static boolean isTypedIdOf(String id, Class<? extends CommonProfile> clazz)
id - user identifierclazz - profile classpublic static CommonProfile buildProfile(String typedId, Map<String,Object> attributes)
typedId - typed identifierattributes - user attributespublic static CommonProfile buildUserProfileByClassCompleteName(String completeName)
completeName - the class namepublic static <U extends CommonProfile> Optional<U> flatIntoOneProfile(LinkedHashMap<String,U> profiles)
U - the kind of profileprofiles - the linked hashmap of profilespublic static <U extends CommonProfile> List<U> flatIntoAProfileList(LinkedHashMap<String,U> profiles)
U - the kind of profileprofiles - the linked hashmap of profilesCopyright © 2017. All Rights Reserved.