Class ContextManager
- java.lang.Object
-
- net.ontopia.topicmaps.nav2.impl.basic.ContextManager
-
- All Implemented Interfaces:
ContextManagerIF
public class ContextManager extends Object implements ContextManagerIF
INTERNAL: Default Implementation of ContextManagerIF.
-
-
Constructor Summary
Constructors Constructor Description ContextManager(javax.servlet.jsp.PageContext pageContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
INTERNAL: Clear all variables hold on stack.Object
getCurrentScope()
INTERNAL: Gets the current lexical scope.Collection
getDefaultValue()
INTERNAL: Gets the default value in the current scope.Collection
getValue(String name)
INTERNAL: Gets value for specified variable name.Collection
getValue(String name, 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(Object obj)
INTERNAL: Sets the default value in the current scope.void
setDefaultValue(Collection coll)
INTERNAL: Sets the default value in the current scope.void
setValue(String name, Object obj)
INTERNAL: Add Collection with specified name to registry.void
setValue(String name, Collection coll)
INTERNAL: Add Collection with specified name to registry.void
setValueInScope(Object scope, String name, Collection coll)
INTERNAL: Add Collection with specified name to to the registry identified byscope
.
-
-
-
Method Detail
-
getValue
public Collection getValue(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 returnnull
.- Specified by:
getValue
in interfaceContextManagerIF
- Throws:
VariableNotSetException
- if value is due to a not set variable not available.
-
getValue
public Collection getValue(String name, 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 interfaceContextManagerIF
-
setValue
public void setValue(String name, Collection coll)
Description copied from interface:ContextManagerIF
INTERNAL: Add Collection with specified name to registry.- Specified by:
setValue
in interfaceContextManagerIF
-
setValueInScope
public void setValueInScope(Object scope, String name, Collection coll)
Description copied from interface:ContextManagerIF
INTERNAL: Add Collection with specified name to to the registry identified byscope
.- Specified by:
setValueInScope
in interfaceContextManagerIF
-
setValue
public void setValue(String name, 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 interfaceContextManagerIF
-
getDefaultValue
public Collection getDefaultValue()
Description copied from interface:ContextManagerIF
INTERNAL: Gets the default value in the current scope.- Specified by:
getDefaultValue
in interfaceContextManagerIF
-
setDefaultValue
public void setDefaultValue(Collection coll)
Description copied from interface:ContextManagerIF
INTERNAL: Sets the default value in the current scope.- Specified by:
setDefaultValue
in interfaceContextManagerIF
-
setDefaultValue
public void setDefaultValue(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 interfaceContextManagerIF
-
getCurrentScope
public 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 interfaceContextManagerIF
-
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 interfaceContextManagerIF
-
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 interfaceContextManagerIF
-
clear
public void clear()
Description copied from interface:ContextManagerIF
INTERNAL: Clear all variables hold on stack.- Specified by:
clear
in interfaceContextManagerIF
-
-