public final class ProfileHelper extends Object
Constructor and Description |
---|
ProfileHelper() |
Modifier and Type | Method and Description |
---|---|
static UserProfile |
buildProfile(String typedId,
Map<String,Object> attributes)
Build a profile from a typed id and a map of attributes.
|
static boolean |
isEnforceProfileDefinition() |
static boolean |
isTypedIdOf(String id,
Class<? extends UserProfile> clazz)
Indicate if the user identifier matches this kind of profile.
|
static void |
setEnforceProfileDefinition(boolean enforceProfileDefinition)
Set whether the profile definition (= attributes definition) should be enforced (= undefined attributes are ignored).
|
static void |
setKeepRawData(boolean keepRawData)
Set whether the input data should be stored in object to be restored for CAS serialization when toString() is called.
|
public static boolean isTypedIdOf(String id, Class<? extends UserProfile> clazz)
id
- user identifierclazz
- profile classpublic static UserProfile buildProfile(String typedId, Map<String,Object> attributes)
typedId
- typed identifierattributes
- user attributespublic static void setKeepRawData(boolean keepRawData)
false
.keepRawData
- should we keep the raw data (for CAS)public static boolean isEnforceProfileDefinition()
public static void setEnforceProfileDefinition(boolean enforceProfileDefinition)
false
since version 1.8. It was true
before.enforceProfileDefinition
- whether the profile definition should be enforcedCopyright © 2016. All rights reserved.