public class LegacyAttributes extends DefaultAttributes
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
context, READ_ONLY_ATTRIBUTE_KEY, user
EMPTY_VALUE
Constructor and Description |
---|
LegacyAttributes(UserProfileContext context,
Map<String,?> attributes,
UserModel user,
UserProfileMetadata profileMetadata,
KeycloakSession session) |
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
getReadable()
Returns only the attributes that have read/write permissions.
|
protected boolean |
isIncludeAttributeIfNotProvided(AttributeMetadata metadata) |
boolean |
isReadOnly(String attributeName)
Checks whether an attribute is read-only.
|
protected boolean |
isSupportedAttribute(String name)
Checks whether an attribute is support by the profile configuration and the current context.
|
attributeSet, contains, createAttributeContext, getMetadata, getValues, isReadOnlyFromMetadata, isReadOnlyInternalAttribute, isRequired, nameSet, toMap, validate
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getFirstValue, getReadable, isRootAttribute
public LegacyAttributes(UserProfileContext context, Map<String,?> attributes, UserModel user, UserProfileMetadata profileMetadata, KeycloakSession session)
protected boolean isSupportedAttribute(String name)
DefaultAttributes
Checks whether an attribute is support by the profile configuration and the current context.
This method can be used to avoid unexpected attributes from being added as an attribute because
the attribute source is a regular Map
and not normalized.
isSupportedAttribute
in class DefaultAttributes
name
- the name of the attributepublic boolean isReadOnly(String attributeName)
Attributes
isReadOnly
in interface Attributes
isReadOnly
in class DefaultAttributes
public Map<String,List<String>> getReadable()
Attributes
getReadable
in interface Attributes
getReadable
in class DefaultAttributes
protected boolean isIncludeAttributeIfNotProvided(AttributeMetadata metadata)
isIncludeAttributeIfNotProvided
in class DefaultAttributes
Copyright © 2021 JBoss by Red Hat. All rights reserved.