Package com.iizix.server.user
Class UserProfileStringURNProvider
- java.lang.Object
- com.iizix.server.user.UserProfileStringURNProvider
 
- All Implemented Interfaces:
- IUserProfileStringURNProvider
 - public class UserProfileStringURNProvider extends java.lang.Object implements IUserProfileStringURNProvider The URN User Profile String Provider singleton class.- Author:
- Christopher Mindus
 
- Constructor Summary- Constructors - Constructor - Description - UserProfileStringURNProvider()
 - Method Summary- All Methods Static Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - java.util.Map<java.lang.String,java.lang.String>- getDetails(long uid, boolean reload)Gets the (cached and current) user details.- java.util.Map<java.lang.String,java.lang.String>- getDetails(java.lang.String userName, boolean reload)Gets the (cached and current) user details.- static IUserProfileStringURNProvider- getInstance()Gets the singleton instance.
 
- Method Detail- getInstance- public static IUserProfileStringURNProvider getInstance() Gets the singleton instance.- Returns:
- The IURNUserProfileProvider instance.
 
 - getDetails- public java.util.Map<java.lang.String,java.lang.String> getDetails(long uid, boolean reload) throws NotFoundExceptionGets the (cached and current) user details. Details are e.g. fax number, profile picture.- Specified by:
- getDetailsin interface- IUserProfileStringURNProvider
- Parameters:
- uid- The User ID (non-zero), or- -1Lfor 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- public java.util.Map<java.lang.String,java.lang.String> getDetails(java.lang.String userName, boolean reload) throws NotFoundExceptionGets the (cached and current) user details. Details are e.g. fax number, profile picture.- Specified by:
- getDetailsin interface- IUserProfileStringURNProvider
- Parameters:
- userName- The user name, or- nullfor 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.