net.ontopia.topicmaps.nav2.impl.basic
Class ContextManager

java.lang.Object
  extended by net.ontopia.topicmaps.nav2.impl.basic.ContextManager
All Implemented Interfaces:
ContextManagerIF

public class ContextManager
extends java.lang.Object
implements ContextManagerIF

INTERNAL: Default Implementation of ContextManagerIF.


Constructor Summary
ContextManager(javax.servlet.jsp.PageContext pageContext)
           
 
Method Summary
 void clear()
          INTERNAL: Clear all variables hold on stack.
 java.lang.Object getCurrentScope()
          INTERNAL: Gets the current lexical scope.
 java.util.Collection getDefaultValue()
          INTERNAL: Gets the default value in the current scope.
 java.util.Collection getValue(java.lang.String name)
          INTERNAL: Gets value for specified variable name.
 java.util.Collection getValue(java.lang.String name, java.util.Collection defaultValue)
          INTERNAL: Gets value for specified variable name.
 void popScope()
          INTERNAL: Removes the current set of variables at the top of this stack.
 void pushScope()
          INTERNAL: Pushes a new set of variables (name/collection-pairs) onto the top of this stack.
 void setDefaultValue(java.util.Collection coll)
          INTERNAL: Sets the default value in the current scope.
 void setDefaultValue(java.lang.Object obj)
          INTERNAL: Sets the default value in the current scope.
 void setValue(java.lang.String name, java.util.Collection coll)
          INTERNAL: Add Collection with specified name to registry.
 void setValue(java.lang.String name, java.lang.Object obj)
          INTERNAL: Add Collection with specified name to registry.
 void setValueInScope(java.lang.Object scope, java.lang.String name, java.util.Collection coll)
          INTERNAL: Add Collection with specified name to to the registry identified by scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextManager

public ContextManager(javax.servlet.jsp.PageContext pageContext)
Method Detail

getValue

public java.util.Collection getValue(java.lang.String name)
                              throws VariableNotSetException
Description copied from interface: ContextManagerIF
INTERNAL: Gets value for specified variable name. First search in current local scope, if there is no such named variable, go up the lexical scope hierarchy and try to retrieve there this variable. If not found at all return null.

Specified by:
getValue in interface ContextManagerIF
Throws:
VariableNotSetException - if value is due to a not set variable not available.

getValue

public java.util.Collection getValue(java.lang.String name,
                                     java.util.Collection defaultValue)
Description copied from interface: ContextManagerIF
INTERNAL: Gets value for specified variable name. It is the same as getValue(String), except that defaultValue is returned if the variable does not exist.

Specified by:
getValue in interface ContextManagerIF

setValue

public void setValue(java.lang.String name,
                     java.util.Collection coll)
Description copied from interface: ContextManagerIF
INTERNAL: Add Collection with specified name to registry.

Specified by:
setValue in interface ContextManagerIF

setValueInScope

public void setValueInScope(java.lang.Object scope,
                            java.lang.String name,
                            java.util.Collection coll)
Description copied from interface: ContextManagerIF
INTERNAL: Add Collection with specified name to to the registry identified by scope.

Specified by:
setValueInScope in interface ContextManagerIF

setValue

public void setValue(java.lang.String name,
                     java.lang.Object obj)
Description copied from interface: ContextManagerIF
INTERNAL: Add Collection with specified name to registry. The object get internally transformed to a Collection.

Specified by:
setValue in interface ContextManagerIF

getDefaultValue

public java.util.Collection getDefaultValue()
Description copied from interface: ContextManagerIF
INTERNAL: Gets the default value in the current scope.

Specified by:
getDefaultValue in interface ContextManagerIF

setDefaultValue

public void setDefaultValue(java.util.Collection coll)
Description copied from interface: ContextManagerIF
INTERNAL: Sets the default value in the current scope.

Specified by:
setDefaultValue in interface ContextManagerIF

setDefaultValue

public void setDefaultValue(java.lang.Object obj)
Description copied from interface: ContextManagerIF
INTERNAL: Sets the default value in the current scope. The object get internally transformed to a Collection.

Specified by:
setDefaultValue in interface ContextManagerIF

getCurrentScope

public java.lang.Object getCurrentScope()
Description copied from interface: ContextManagerIF
INTERNAL: Gets the current lexical scope. This object is an opaque identifier that is only to be used by setValueInScope for identifying the scope in which you want to set a value. Clients should not make any assumptions about this object, and should not try to modify it or work directly with it.

Specified by:
getCurrentScope in interface ContextManagerIF

pushScope

public void pushScope()
Description copied from interface: ContextManagerIF
INTERNAL: Pushes a new set of variables (name/collection-pairs) onto the top of this stack.

Specified by:
pushScope in interface ContextManagerIF

popScope

public void popScope()
Description copied from interface: ContextManagerIF
INTERNAL: Removes the current set of variables at the top of this stack.

Specified by:
popScope in interface ContextManagerIF

clear

public void clear()
Description copied from interface: ContextManagerIF
INTERNAL: Clear all variables hold on stack.

Specified by:
clear in interface ContextManagerIF


Copyright © 2000-2012 Ontopia.