public final class ProfileHelper extends Object
Modifier and Type | Method and Description |
---|---|
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 InternalAttributeHandler |
getInternalAttributeHandler() |
static boolean |
isTypedIdOf(String id,
Class<? extends CommonProfile> clazz)
Indicate if the user identifier matches this kind of profile.
|
static CommonProfile |
restoreOrBuildProfile(ProfileDefinition<? extends CommonProfile> profileDefinition,
String typedId,
Map<String,Object> attributes,
Object... parameters)
Restore or build a profile.
|
static void |
setInternalAttributeHandler(InternalAttributeHandler internalAttributeHandler) |
public static boolean isTypedIdOf(String id, Class<? extends CommonProfile> clazz)
id
- user identifierclazz
- profile classpublic static CommonProfile restoreOrBuildProfile(ProfileDefinition<? extends CommonProfile> profileDefinition, String typedId, Map<String,Object> attributes, Object... parameters)
profileDefinition
- the profile definitiontypedId
- the typed identifierattributes
- the attributesparameters
- additional parameters for the profile definitionpublic 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 profilespublic static InternalAttributeHandler getInternalAttributeHandler()
public static void setInternalAttributeHandler(InternalAttributeHandler internalAttributeHandler)
Copyright © 2017. All rights reserved.