public interface UserProfileHandler
Modifier and Type | Method and Description |
---|---|
void |
addUserProfileEventListener(UserProfileEventListener listener)
When a method save , remove are called , the will broadcast an event.
|
UserProfile |
createUserProfileInstance() |
UserProfile |
createUserProfileInstance(String userName) |
UserProfile |
findUserProfileByName(String userName)
This method should search for and return UserProfile record according to
the username
|
Collection |
findUserProfiles()
Find and return all the UserProfile record in the database
|
UserProfile |
removeUserProfile(String userName,
boolean broadcast)
This method should remove the user profile record in the database.
|
void |
removeUserProfileEventListener(UserProfileEventListener listener)
This method is used to unregister listener.
|
void |
saveUserProfile(UserProfile profile,
boolean broadcast)
This method should persist the profile instance to the database.
|
UserProfile createUserProfileInstance()
UserProfile createUserProfileInstance(String userName)
userName
- The user profile record with the usernamevoid saveUserProfile(UserProfile profile, boolean broadcast) throws Exception
profile
- the profile instance to persist.broadcast
- broadcast the event to the listener if broadcast is trueException
- throw exception if the method fail to access the database
or any listener fail to handle the event.UserProfile removeUserProfile(String userName, boolean broadcast) throws Exception
userName
- The user profile record with the username should be removed
from the databasebroadcast
- Broadcast the event the listeners if broadcast is true.Exception
- Throw exception if the method fail to remove the record
or any listener fail to handle the eventUserProfile findUserProfileByName(String userName) throws Exception
userName
- the user nameException
- Throw Exception if the method fail to access the database
or find more than one record that match the username.UserProfile
Collection findUserProfiles() throws Exception
Exception
- Throw exception if the method fail to access the databasevoid addUserProfileEventListener(UserProfileEventListener listener)
listener
- The listener instanceUserProfileEventListener
void removeUserProfileEventListener(UserProfileEventListener listener)
listener
- The listener instanceUserProfileEventListener
Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.