Package com.iizix.server.user
Class UserProfileStringURNProvider
java.lang.Object
com.iizix.server.user.UserProfileStringURNProvider
- All Implemented Interfaces:
IUserProfileStringURNProvider
The URN User Profile String Provider singleton class.
- Author:
- Christopher Mindus
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetDetails
(long uid, boolean reload) Gets the (cached and current) user details.getDetails
(String userName, boolean reload) Gets the (cached and current) user details.Gets the singleton instance.
Constructor Details
UserProfileStringURNProvider
public UserProfileStringURNProvider()
Method Details
getInstance
Gets the singleton instance.- Returns:
- The IURNUserProfileProvider instance.
getDetails
Gets the (cached and current) user details. Details are e.g. fax number, profile picture.- Specified by:
getDetails
in interfaceIUserProfileStringURNProvider
- Parameters:
uid
- The User ID (non-zero), or-1L
for logged in current user.reload
- Reload flag from database.- Returns:
- If reload is false, a cached read-only map with the details name as key and the value for it, otherwise a fresh copy of the details from the database.
- Throws:
NotFoundException
- If the user ID or the User Name is not found in the database, or a database error occurred.
getDetails
Gets the (cached and current) user details. Details are e.g. fax number, profile picture.- Specified by:
getDetails
in interfaceIUserProfileStringURNProvider
- Parameters:
userName
- The user name, ornull
for currently logged in user.reload
- Reload flag from database.- Returns:
- If reload is false, a cached read-only map with the details name as key and the value for it, otherwise a fresh copy of the details from the database.
- Throws:
NotFoundException
- If the user ID or the User Name is not found in the database, or a database error occurred.