nl.gx.webmanager.services.usermanager
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 all Realms.


Method Summary
 java.util.List<java.util.List<java.lang.String>> export(User user)
          This method should return a list of values whose size is equal to the size of the list returned by getExportColumnHeaders().
 java.util.List<java.lang.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 given User get created.
 void onDelete(User user)
          Call back method that will be invoked by the framework when the given User 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 given User get created.

Parameters:
user - the User instance that just has been created

onDelete

void onDelete(User user)
Call back method that will be invoked by the framework when the given User get deleted.

Parameters:
user - the User 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 - the User 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

java.util.List<java.lang.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

java.util.List<java.util.List<java.lang.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 by getExportColumnHeaders(). 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


Copyright © 2007-2011 GX Software BV. All Rights Reserved.