public abstract class ProfileDefinition<P extends CommonProfile> extends Object
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
protected Function<Object[],P> |
newProfile |
Constructor and Description |
---|
ProfileDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
convertAndAdd(CommonProfile profile,
AttributeLocation attributeLocation,
String name,
Object value)
Convert a profile or authentication attribute, if necessary, and add it to the profile.
|
void |
convertAndAdd(CommonProfile profile,
Map<String,Object> attributes)
Deprecated.
Use
convertAndAdd(CommonProfile, Map, Map) instead. |
void |
convertAndAdd(CommonProfile profile,
Map<String,Object> profileAttributes,
Map<String,Object> authenticationAttributes)
Convert the profile and authentication attributes, if necessary, and add them to the profile.
|
void |
convertAndAdd(CommonProfile profile,
String name,
Object value)
Deprecated.
|
protected Map<String,AttributeConverter<? extends Object>> |
getConverters() |
List<String> |
getPrimaryAttributes() |
List<String> |
getSecondaryAttributes() |
P |
newProfile(Object... parameters)
Return the new built profile.
|
protected void |
primary(String name,
AttributeConverter<? extends Object> converter)
Add an attribute as a primary one and its converter.
|
protected void |
secondary(String name,
AttributeConverter<? extends Object> converter)
Add an attribute as a secondary one and its converter.
|
protected void |
setProfileFactory(Function<Object[],P> profileFactory)
Define the way to build the profile.
|
protected final org.slf4j.Logger logger
protected Function<Object[],P extends CommonProfile> newProfile
public P newProfile(Object... parameters)
parameters
- some optional input parameters@Deprecated public void convertAndAdd(CommonProfile profile, String name, Object value)
convertAndAdd(CommonProfile, AttributeLocation, String, Object)
instead.profile
- the profilename
- the attribute namevalue
- the attribute valuepublic void convertAndAdd(CommonProfile profile, AttributeLocation attributeLocation, String name, Object value)
profile
- The profile.attributeLocation
- Location of the attribute inside the profile: classic profile attribute, authentication attribute, ...name
- The attribute name.value
- The attribute value.@Deprecated public void convertAndAdd(CommonProfile profile, Map<String,Object> attributes)
convertAndAdd(CommonProfile, Map, Map)
instead.convertAndAdd(CommonProfile, Map, Map)
which supports adding authentication attributes.profile
- The profile.attributes
- The profile attributes. May be null
.public void convertAndAdd(CommonProfile profile, Map<String,Object> profileAttributes, Map<String,Object> authenticationAttributes)
profile
- The profile.profileAttributes
- The profile attributes. May be null
.authenticationAttributes
- The authentication attributes. May be null
.protected void setProfileFactory(Function<Object[],P> profileFactory)
profileFactory
- the way to build the profileprotected void primary(String name, AttributeConverter<? extends Object> converter)
name
- name of the attributeconverter
- converterprotected void secondary(String name, AttributeConverter<? extends Object> converter)
name
- name of the attributeconverter
- converterprotected Map<String,AttributeConverter<? extends Object>> getConverters()
Copyright © 2018. All rights reserved.