org.olat.core.id
Interface User

All Superinterfaces:
CreateInfo, Persistable, java.io.Serializable
All Known Implementing Classes:
UserImpl

public interface User
extends CreateInfo, Persistable

Description:

The user represents a real world user with the following elements:

Author:
Florian Gnägi

Method Summary
 Preferences getPreferences()
          Get the users prefereces object
 java.lang.String getProperty(java.lang.String propertyName, java.util.Locale locale)
          Get a user property value for the given property identifyer.
 java.lang.String getPropertyOrIdentityEnvAttribute(java.lang.String propertyName, java.util.Locale locale)
          returns the property value, which is looked up first in the db stored user properties and if not available there, if it can be found in the volatile identity attributes which get set once per session during the login process.
 void setIdentityEnvironmentAttributes(java.util.Map<java.lang.String,java.lang.String> identEnvAttribs)
          internal use only.
 void setPreferences(Preferences prefs)
          Set the users prefereces
 void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Set the value for the given user property identifyer
 
Methods inherited from interface org.olat.core.id.CreateInfo
getCreationDate
 
Methods inherited from interface org.olat.core.id.Persistable
equalsByPersistableKey, getKey
 

Method Detail

getPreferences

Preferences getPreferences()
Get the users prefereces object

Returns:
The users preferences object

setPreferences

void setPreferences(Preferences prefs)
Set the users prefereces

Parameters:
prefs - The users new preferences

setProperty

void setProperty(java.lang.String propertyName,
                 java.lang.String propertyValue)
Set the value for the given user property identifyer

Parameters:
propertyName - The user property identifyer
propertyValue - The new value or NULL if no value is used

getProperty

java.lang.String getProperty(java.lang.String propertyName,
                             java.util.Locale locale)
Get a user property value for the given property identifyer. The local might be used to format the returned value if it is an internationalized value

Parameters:
propertyName - The user property identifyer
locale - The locale used for proper display or NULL if the default locale should be used. In many cases it is ok to use NULL in any case, e.g. the users firstname will not be internationalized in anyway. Make sure you use a locale whenever you query for a date property.
Returns:
The value or NULL if no value is set

setIdentityEnvironmentAttributes

void setIdentityEnvironmentAttributes(java.util.Map<java.lang.String,java.lang.String> identEnvAttribs)
internal use only.

Parameters:
identEnvAttribs -

getPropertyOrIdentityEnvAttribute

java.lang.String getPropertyOrIdentityEnvAttribute(java.lang.String propertyName,
                                                   java.util.Locale locale)
returns the property value, which is looked up first in the db stored user properties and if not available there, if it can be found in the volatile identity attributes which get set once per session during the login process.

Usage so far is during Shibboleth Login (ShibbolethDispatcher), where the shibboleth attributes are extracted and set in the identity environment.

Parameters:
next -
locale -
Returns:
Since:
introducing user tracking it was needed to expose the volatile identity environments attribute also in the user for the UserActivityLogger(Impl).