Class UserProfileStringURNProvider
- All Implemented Interfaces:
IUserProfileStringURNProvider
Who may resolve a profile (CC-FIX-URN-LOCKDOWN, ruling UR-1 of order 515): the caller's own profile only. The caller is the user the server's sign-in recorded for the application session of the calling thread (IAppSessionGyro.getAuthenticatedUser()), never a user the client named in its entry URL; a thread outside a session, or a session nobody has signed in to, resolves nothing. Another user's profile, an unknown user ID or user name, a missing session and a database failure all answer the ONE text of NOT_AVAILABLE, so that a URN cannot tell "no such user" from "not allowed" (U515-23). Until this order the two overloads resolved any user's 36 details - PIN code and recovery answer included - for any caller, with no check of the session, the user or the application (U515-20, U515-21), and the "current user" branch read the client-named user label and dereferenced a missing session (U515-22).
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe one text for "no such user", "not signed in", "not allowed" and "database failure": "User profile is not available: " followed by what was requested (a user ID or a user name).Constructor Summary
ConstructorsMethod 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.
Field Details
NOT_AVAILABLE
The one text for "no such user", "not signed in", "not allowed" and "database failure": "User profile is not available: " followed by what was requested (a user ID or a user name).- See Also:
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:
getDetailsin interfaceIUserProfileStringURNProvider- Parameters:
uid- The User ID (non-zero), or-1Lfor the signed-in user of the current session.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-NOT_AVAILABLEand the user ID: no session or nobody signed in, the user ID not found, not the signed-in user's, or a database error occurred.
getDetails
Gets the (cached and current) user details. Details are e.g. fax number, profile picture.- Specified by:
getDetailsin interfaceIUserProfileStringURNProvider- Parameters:
userName- The user name, ornullfor the signed-in user of the current session.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-NOT_AVAILABLEand the user name: no session or nobody signed in, the user name not found, not the signed-in user's, or a database error occurred.