public final class ProfileHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static CommonProfile |
buildUserProfileByClassCompleteName(java.lang.String completeName)
Build a profile by its class name.
|
static <U extends CommonProfile> |
flatIntoAProfileList(java.util.Map<java.lang.String,U> profiles)
Flat the map of profiles into a list of profiles.
|
static <U extends CommonProfile> |
flatIntoOneProfile(java.util.Collection<U> profiles)
Flat the list of profiles into a single optional profile (skip any anonymous profile unless it's the only one).
|
static InternalAttributeHandler |
getInternalAttributeHandler() |
static boolean |
isTypedIdOf(java.lang.String id,
java.lang.Class<? extends CommonProfile> clazz)
Indicate if the user identifier matches this kind of profile.
|
static CommonProfile |
restoreOrBuildProfile(ProfileDefinition<? extends CommonProfile> profileDefinition,
java.lang.String typedId,
java.util.Map<java.lang.String,java.lang.Object> profileAttributes,
java.util.Map<java.lang.String,java.lang.Object> authenticationAttributes,
java.lang.Object... parameters)
Restore or build a profile.
|
static java.lang.String |
sanitizeIdentifier(UserProfile profile,
java.lang.Object id)
Sanitize into a string identifier.
|
static void |
setInternalAttributeHandler(InternalAttributeHandler internalAttributeHandler) |
public static boolean isTypedIdOf(java.lang.String id,
java.lang.Class<? extends CommonProfile> clazz)
id - user identifierclazz - profile classpublic static CommonProfile restoreOrBuildProfile(ProfileDefinition<? extends CommonProfile> profileDefinition, java.lang.String typedId, java.util.Map<java.lang.String,java.lang.Object> profileAttributes, java.util.Map<java.lang.String,java.lang.Object> authenticationAttributes, java.lang.Object... parameters)
profileDefinition - the profile definitiontypedId - the typed identifierprofileAttributes - The profile attributes. May be null.authenticationAttributes - The authentication attributes. May be null.parameters - additional parameters for the profile definitionpublic static CommonProfile buildUserProfileByClassCompleteName(java.lang.String completeName)
completeName - the class namepublic static <U extends CommonProfile> java.util.Optional<U> flatIntoOneProfile(java.util.Collection<U> profiles)
U - the kind of profileprofiles - the list of profilespublic static <U extends CommonProfile> java.util.List<U> flatIntoAProfileList(java.util.Map<java.lang.String,U> profiles)
U - the kind of profileprofiles - the map of profilespublic static java.lang.String sanitizeIdentifier(UserProfile profile, java.lang.Object id)
profile - the user profileid - the identifier objectpublic static InternalAttributeHandler getInternalAttributeHandler()
public static void setInternalAttributeHandler(InternalAttributeHandler internalAttributeHandler)
Copyright © 2019. All Rights Reserved.