org.activemath.webapp.user
Class UserContext

java.lang.Object
  extended by org.activemath.webapp.user.UserContext

public class UserContext
extends Object

This interface is needed to Contextualize the actions of the user. By contextualization I mean here whether the user is working in a book (and the in which book), which windows are open (dictionary?) and similar stuff.


Constructor Summary
UserContext()
          constructor for userContext objects.
 
Method Summary
 boolean equals(Object o)
           
 ContextDescription getContextDescription()
          returns a short description of the context the user is in (e.g.
 String getContextParameter(String paramName)
          returns a contexts paramValue if it exists, null otherwise
 boolean mustReassert()
           
 void setContextDescription(ContextDescription ctx)
          sets the current Context's ContextDescription
 void setContextParameter(String paramName, String paramValue)
          sets the given paramName to paramValue in this UserContext.
 void setReassert(boolean reassert)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserContext

public UserContext()
constructor for userContext objects.

Method Detail

getContextDescription

public ContextDescription getContextDescription()
returns a short description of the context the user is in (e.g. RecBook, Dictionary).

Returns:

setContextDescription

public void setContextDescription(ContextDescription ctx)
sets the current Context's ContextDescription


getContextParameter

public String getContextParameter(String paramName)
returns a contexts paramValue if it exists, null otherwise

Parameters:
paramName - the name of the paramtere to get from this context
Returns:
the value of the given paramName, null if it doesn't exists.

setContextParameter

public void setContextParameter(String paramName,
                                String paramValue)
sets the given paramName to paramValue in this UserContext.

Parameters:
paramName - the name of the parameter to set
paramValue - the value of the parameter to set.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

mustReassert

public boolean mustReassert()
Returns:
Returns true if the fact has to be reasserted to the JESS Factbase

setReassert

public void setReassert(boolean reassert)
Parameters:
reassert - whether this UserContext should be reasserted into the jess FB.