public abstract class AbstractUserProfileBean extends Object
Modifier and Type | Class and Description |
---|---|
class |
AbstractUserProfileBean.Attribute
Info about user profile attribute available in Freemarker template.
|
Modifier and Type | Field and Description |
---|---|
protected List<AbstractUserProfileBean.Attribute> |
attributes |
protected Map<String,AbstractUserProfileBean.Attribute> |
attributesByName |
protected javax.ws.rs.core.MultivaluedMap<String,String> |
formData |
protected UserProfile |
profile |
Constructor and Description |
---|
AbstractUserProfileBean(javax.ws.rs.core.MultivaluedMap<String,String> formData) |
Modifier and Type | Method and Description |
---|---|
protected abstract UserProfile |
createUserProfile(UserProfileProvider provider)
Create UserProfile instance of the relevant type.
|
protected abstract String |
getAttributeDefaultValue(String name)
Get attribute default value to be pre-filled into the form on first show.
|
List<AbstractUserProfileBean.Attribute> |
getAttributes()
All attributes to be shown in form sorted by the configured GUI order.
|
Map<String,AbstractUserProfileBean.Attribute> |
getAttributesByName()
Get map of all attributes where attribute name is key.
|
abstract String |
getContext()
Get context the template is used for, so view can be customized for distinct contexts.
|
protected void |
init(KeycloakSession session,
boolean writeableOnly)
Subclass have to call this method at the end of constructor to init user profile data.
|
protected UserProfile profile
protected List<AbstractUserProfileBean.Attribute> attributes
protected Map<String,AbstractUserProfileBean.Attribute> attributesByName
protected void init(KeycloakSession session, boolean writeableOnly)
session
- writeableOnly
- if true then only writeable (no read-only) attributes are put into template, if false then all readable attributes are thereprotected abstract UserProfile createUserProfile(UserProfileProvider provider)
init(KeycloakSession, boolean)
.provider
- to create UserProfile fromprotected abstract String getAttributeDefaultValue(String name)
name
- of the attributepublic abstract String getContext()
public List<AbstractUserProfileBean.Attribute> getAttributes()
public Map<String,AbstractUserProfileBean.Attribute> getAttributesByName()
Copyright © 2021 JBoss by Red Hat. All rights reserved.