Package net.ontopia.topicmaps.nav2.core
Interface ContextManagerIF
-
- All Known Implementing Classes:
ContextManager
public interface ContextManagerIF
INTERNAL: Interface which have to be implemented by classes managing the context of a complete sub-hierarchy.
-
-
Method Summary
All Methods Instance Methods Abstract 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 obj)
INTERNAL: Add Collection with specified name to to the registry identified byscope
.
-
-
-
Method Detail
-
getCurrentScope
Object getCurrentScope()
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.
-
getValue
Collection getValue(String name) throws VariableNotSetException
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
.- Throws:
VariableNotSetException
- if value is due to a not set variable not available.
-
getValue
Collection getValue(String name, Collection defaultValue)
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.- Since:
- 1.4.1
-
setValue
void setValue(String name, Collection coll)
INTERNAL: Add Collection with specified name to registry.
-
setValue
void setValue(String name, Object obj)
INTERNAL: Add Collection with specified name to registry. The object get internally transformed to a Collection.
-
setValueInScope
void setValueInScope(Object scope, String name, Collection obj)
INTERNAL: Add Collection with specified name to to the registry identified byscope
.
-
getDefaultValue
Collection getDefaultValue() throws VariableNotSetException
INTERNAL: Gets the default value in the current scope.- Throws:
VariableNotSetException
- if value is due to a not set variable not available.
-
setDefaultValue
void setDefaultValue(Collection coll)
INTERNAL: Sets the default value in the current scope.
-
setDefaultValue
void setDefaultValue(Object obj)
INTERNAL: Sets the default value in the current scope. The object get internally transformed to a Collection.
-
pushScope
void pushScope()
INTERNAL: Pushes a new set of variables (name/collection-pairs) onto the top of this stack.
-
popScope
void popScope()
INTERNAL: Removes the current set of variables at the top of this stack.
-
clear
void clear()
INTERNAL: Clear all variables hold on stack.
-
-