Interface ProfileExtensionProvider<T extends ProfileExtension>
-
- Type Parameters:
T
- the type of profile that this provider provides
- All Known Subinterfaces:
DefaultProfileProvider
public interface ProfileExtensionProvider<T extends ProfileExtension>
Defines the interface that need to be implemented by all providers of profile extensions. Implementations of this interface must be stateless and should be able to handle users and profiles from allRealms
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<List<String>>
export(User user)
This method should return a list of values whose size is equal to the size of the list returned bygetExportColumnHeaders()
.List<String>
getExportColumnHeaders()
This method should return a constant list of strings which are the column headers of the values that are exported by this profile extension.T
getProfileFor(User user)
Gets the profile for the given user.void
onCreate(User user)
Call back method that will be invoked by the framework when the givenUser
get created.void
onDelete(User user)
Call back method that will be invoked by the framework when the givenUser
get deleted.void
update(T profile)
Updates the given profile.
-
-
-
Method Detail
-
onCreate
void onCreate(User user)
Call back method that will be invoked by the framework when the givenUser
get created.- Parameters:
user
- theUser
instance that just has been created
-
onDelete
void onDelete(User user)
Call back method that will be invoked by the framework when the givenUser
get deleted.- Parameters:
user
- theUser
instance that just has been deleted
-
getProfileFor
T getProfileFor(User user) throws UserManagementException
Gets the profile for the given user. If the profile part exists, then it is returned, otherwise a default profile part is returned which can be modified and updated.- Parameters:
user
- theUser
to get the profile for- Returns:
- the user's profile
- Throws:
UserManagementException
- on error
-
update
void update(T profile) throws UserManagementException
Updates the given profile.- Parameters:
profile
- the profile to update- Throws:
UserManagementException
- on error
-
getExportColumnHeaders
List<String> getExportColumnHeaders()
This method should return a constant list of strings which are the column headers of the values that are exported by this profile extension.- Returns:
- the headers of the fields that are present in an export
-
export
List<List<String>> export(User user) throws UserManagementException
This method should return a list of values whose size is equal to the size of the list returned bygetExportColumnHeaders()
. Each entry in the returned list is a list of strings and represents a single profile property. Single-valued profile properties are to be represented by a list of length 1. Multi-valued profile properties can be represented by a list of appropriate size.- Parameters:
user
- the user whose profile to export- Returns:
- the values for the exportable fields of the given profile
- Throws:
UserManagementException
- on error
-
-