net.ontopia.topicmaps.nav2.impl.framework
Class User

java.lang.Object
  extended by net.ontopia.topicmaps.nav2.impl.framework.User
All Implemented Interfaces:
java.io.Serializable, UserIF

public class User
extends java.lang.Object
implements UserIF, java.io.Serializable

INTERNAL: implementation of UserIF for holding data relevant to one user session.

See Also:
Serialized Form

Field Summary
protected  long bundleExpiryAge
           
protected  UserFilterContextStore filterContext
           
protected  HistoryMap history
           
protected  java.lang.String id
           
protected  long initialBundleExpiryAge
           
protected  RingBuffer log
           
protected  int max_bundles
           
protected  java.lang.String model
           
protected  java.lang.String skin
           
protected  java.util.Map timeStamps
           
protected  java.lang.String view
           
protected  java.util.Map workingBundles
           
 
Fields inherited from interface net.ontopia.topicmaps.nav2.core.UserIF
COMMON_USER, DEFAULT_MODEL, DEFAULT_SKIN, DEFAULT_VIEW
 
Constructor Summary
User()
          default constructor using a common user id.
User(NavigatorConfigurationIF navConf)
           
User(java.lang.String userId, NavigatorConfigurationIF navConf)
           
 
Method Summary
 void addLogMessage(java.lang.String message)
          INTERNAL: Adds a message to the user's log.
 void addWorkingBundle(java.lang.String bundle_id, java.lang.Object object)
          INTERNAL: Stores a working bundle of objects under the specified id.
 void clearLog()
          INTERNAL: Clears the user's log.
 UserFilterContextStore getFilterContext()
          INTERNAL: Gets the Filter Context object which stores for each topicmap a set of themes the user has selected.
 HistoryMap getHistory()
          INTERNAL: Gets the last used objects (instances of Object, specialisation through the web application) which the user has visited.
 java.lang.String getId()
          INTERNAL: Gets the user identifier.
 org.slf4j.Logger getLogger()
          INTERNAL: Gets the Slf4J Logger object to which the User object should transmit the log messages.
 java.util.List getLogMessages()
          INTERNAL: Gets the current log messages from the ring buffer.
 java.lang.String getModel()
          Get Model Setting for MVS.
 java.lang.String getSkin()
          Get Skin (Stylesheet) Setting for MVS.
 java.lang.String getView()
          Get View (Template) Setting for MVS.
 java.lang.Object getWorkingBundle(java.lang.String bundle_id)
          INTERNAL: Gets an ordered lists of objects (parameter name as key, list of objects as value) grouped together by the given identifier id.
 void removeWorkingBundle(java.lang.String bundle_id)
          INTERNAL: Removes the specified working bundle.
 void resetBundleExpiryAge()
          INTERNAL: Resets bundleExpiryAge to its initial value.
 void setBundleExpiryAge(long bundleExpiryAge)
          INTERNAL: Sets bundleExpiryAge to a given value.
 void setHistory(HistoryMap history)
          INTERNAL: Sets the last used objects that are in relation to the user and his path through the web application.
 void setModel(java.lang.String model)
          Set Model Setting.
 void setMVS(java.lang.String model, java.lang.String view, java.lang.String skin)
           
 void setSkin(java.lang.String skin)
          Set Skin Setting.
 void setView(java.lang.String view)
          Set View Setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

model

protected java.lang.String model

view

protected java.lang.String view

skin

protected java.lang.String skin

filterContext

protected transient UserFilterContextStore filterContext

history

protected transient HistoryMap history

log

protected transient RingBuffer log

workingBundles

protected transient java.util.Map workingBundles

timeStamps

protected transient java.util.Map timeStamps

bundleExpiryAge

protected long bundleExpiryAge

initialBundleExpiryAge

protected final long initialBundleExpiryAge

max_bundles

protected final int max_bundles
Constructor Detail

User

public User()
default constructor using a common user id.


User

public User(NavigatorConfigurationIF navConf)

User

public User(java.lang.String userId,
            NavigatorConfigurationIF navConf)
Method Detail

getId

public java.lang.String getId()
Description copied from interface: UserIF
INTERNAL: Gets the user identifier.

Specified by:
getId in interface UserIF

getFilterContext

public UserFilterContextStore getFilterContext()
Description copied from interface: UserIF
INTERNAL: Gets the Filter Context object which stores for each topicmap a set of themes the user has selected.

Specified by:
getFilterContext in interface UserIF

getHistory

public HistoryMap getHistory()
Description copied from interface: UserIF
INTERNAL: Gets the last used objects (instances of Object, specialisation through the web application) which the user has visited.

Specified by:
getHistory in interface UserIF

setHistory

public void setHistory(HistoryMap history)
Description copied from interface: UserIF
INTERNAL: Sets the last used objects that are in relation to the user and his path through the web application.

Specified by:
setHistory in interface UserIF

getLogger

public org.slf4j.Logger getLogger()
Description copied from interface: UserIF
INTERNAL: Gets the Slf4J Logger object to which the User object should transmit the log messages. This method is now deprecated, and we recommend using addLogMessage() instead.

Specified by:
getLogger in interface UserIF

getLogMessages

public java.util.List getLogMessages()
Description copied from interface: UserIF
INTERNAL: Gets the current log messages from the ring buffer.

Specified by:
getLogMessages in interface UserIF

addLogMessage

public void addLogMessage(java.lang.String message)
Description copied from interface: UserIF
INTERNAL: Adds a message to the user's log. The order of these messages is preserved, but if too many messages are added, the latest ones are lost.

Specified by:
addLogMessage in interface UserIF

clearLog

public void clearLog()
Description copied from interface: UserIF
INTERNAL: Clears the user's log.

Specified by:
clearLog in interface UserIF

addWorkingBundle

public void addWorkingBundle(java.lang.String bundle_id,
                             java.lang.Object object)
Description copied from interface: UserIF
INTERNAL: Stores a working bundle of objects under the specified id.

Specified by:
addWorkingBundle in interface UserIF

getWorkingBundle

public java.lang.Object getWorkingBundle(java.lang.String bundle_id)
Description copied from interface: UserIF
INTERNAL: Gets an ordered lists of objects (parameter name as key, list of objects as value) grouped together by the given identifier id.

Specified by:
getWorkingBundle in interface UserIF

removeWorkingBundle

public void removeWorkingBundle(java.lang.String bundle_id)
Description copied from interface: UserIF
INTERNAL: Removes the specified working bundle.

Specified by:
removeWorkingBundle in interface UserIF

setBundleExpiryAge

public void setBundleExpiryAge(long bundleExpiryAge)
INTERNAL: Sets bundleExpiryAge to a given value.

Parameters:
bundleExpiryAge - age in seconds until bundles expire.

resetBundleExpiryAge

public void resetBundleExpiryAge()
INTERNAL: Resets bundleExpiryAge to its initial value.


setModel

public void setModel(java.lang.String model)
Description copied from interface: UserIF
Set Model Setting.

Specified by:
setModel in interface UserIF

getModel

public java.lang.String getModel()
Description copied from interface: UserIF
Get Model Setting for MVS.

Specified by:
getModel in interface UserIF

setView

public void setView(java.lang.String view)
Description copied from interface: UserIF
Set View Setting.

Specified by:
setView in interface UserIF

getView

public java.lang.String getView()
Description copied from interface: UserIF
Get View (Template) Setting for MVS.

Specified by:
getView in interface UserIF

setSkin

public void setSkin(java.lang.String skin)
Description copied from interface: UserIF
Set Skin Setting.

Specified by:
setSkin in interface UserIF

getSkin

public java.lang.String getSkin()
Description copied from interface: UserIF
Get Skin (Stylesheet) Setting for MVS.

Specified by:
getSkin in interface UserIF

setMVS

public void setMVS(java.lang.String model,
                   java.lang.String view,
                   java.lang.String skin)


Copyright © 2000-2012 Ontopia.