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
 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 obj)
          INTERNAL: Add Collection with specified name to to the registry identified by scope.
 

Method Detail

getCurrentScope

java.lang.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

java.util.Collection getValue(java.lang.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 return null.

Throws:
VariableNotSetException - if value is due to a not set variable not available.

getValue

java.util.Collection getValue(java.lang.String name,
                              java.util.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(java.lang.String name,
              java.util.Collection coll)
INTERNAL: Add Collection with specified name to registry.


setValue

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


setValueInScope

void setValueInScope(java.lang.Object scope,
                     java.lang.String name,
                     java.util.Collection obj)
INTERNAL: Add Collection with specified name to to the registry identified by scope.


getDefaultValue

java.util.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(java.util.Collection coll)
INTERNAL: Sets the default value in the current scope.


setDefaultValue

void setDefaultValue(java.lang.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.



Copyright © 2000-2012 Ontopia.