public interface UserProfileProvider extends Provider
The provider responsible for creating UserProfile
instances.
UserProfile
Modifier and Type | Method and Description |
---|---|
UserProfile |
create(UserProfileContext context,
Map<String,?> attributes)
|
UserProfile |
create(UserProfileContext context,
Map<String,?> attributes,
UserModel user)
|
UserProfile |
create(UserProfileContext context,
UserModel user)
Creates a new
UserProfile instance only for validation purposes to check whether its attributes are in conformance
with the given context and profile configuration. |
String |
getConfiguration()
Get current UserProfile configuration.
|
void |
setConfiguration(String configuration)
Set new UserProfile configuration.
|
UserProfile create(UserProfileContext context, UserModel user)
Creates a new UserProfile
instance only for validation purposes to check whether its attributes are in conformance
with the given context
and profile configuration.
context
- the contextuser
- an existing userUserProfile create(UserProfileContext context, Map<String,?> attributes)
Creates a new UserProfile
instance for a given context
and attributes
for validation purposes.
Instances created from this method are usually related to contexts where validation and updates are performed in different
steps, or when creating new users based on the given attributes
.
context
- the contextattributes
- the attributes to associate with the instance returned from this methodUserProfile create(UserProfileContext context, Map<String,?> attributes, UserModel user)
Creates a new UserProfile
instance for a given context
and attributes
for update purposes.
Instances created from this method are going to run validations and updates based on the given user
. This
might be useful when updating an existing user.
context
- the contextattributes
- the attributes to associate with the instance returned from this methoduser
- the user to eventually update with the given attributes
String getConfiguration()
setConfiguration(String)
void setConfiguration(String configuration)
configuration
- to be setRuntimeException
- if configuration is invalid (exact exception class
depends on the implementation) or configuration
can't be persisted.getConfiguration()
Copyright © 2021 JBoss by Red Hat. All rights reserved.