Interface UserProfileProvider
- All Superinterfaces:
Provider
- All Known Implementing Classes:
DeclarativeUserProfileProvider
The provider responsible for creating UserProfile
instances.
- Author:
- Markus Till
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(UserProfileContext context, Map<String, ?> attributes) create
(UserProfileContext context, Map<String, ?> attributes, UserModel user) create
(UserProfileContext context, UserModel user) Creates a newUserProfile
instance only for validation purposes to check whether its attributes are in conformance with the givencontext
and profile configuration.Get current UserProfile configuration.void
setConfiguration
(UPConfig configuration) Set new UserProfile configuration.
-
Method Details
-
create
Creates a new
UserProfile
instance only for validation purposes to check whether its attributes are in conformance with the givencontext
and profile configuration.- Parameters:
context
- the contextuser
- an existing user- Returns:
- the user profile instance
-
create
Creates a new
UserProfile
instance for a givencontext
andattributes
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
.- Parameters:
context
- the contextattributes
- the attributes to associate with the instance returned from this method- Returns:
- the user profile instance
-
create
Creates a new
UserProfile
instance for a givencontext
andattributes
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.- Parameters:
context
- the contextattributes
- the attributes to associate with the instance returned from this methoduser
- the user to eventually update with the givenattributes
- Returns:
- the user profile instance
-
getConfiguration
UPConfig getConfiguration()Get current UserProfile configuration.- Returns:
- current UserProfile configuration
- See Also:
-
setConfiguration
Set new UserProfile configuration. It is persisted inside of the provider.- Parameters:
configuration
- to be set. It can be null and in this case, userProfile implementation will switch to use the default configuration- Throws:
RuntimeException
- if configuration is invalid (exact exception class depends on the implementation) or configuration can't be persisted.- See Also:
-