com.iplanet.jato.model
Interface ContextualModel

All Superinterfaces:
Model
All Known Implementing Classes:
DefaultModel

public interface ContextualModel
extends Model

A model whose data and/or operations can be sectioned into multiple contexts. The standard model operations are assumed to operate within a context such that the same operation in a different context has a different effect or result.

Since:
1.1
Version:
JATO/1.2.2 $Id: ContextualModel.java,v 1.8 2002/03/16 03:26:30 todd Exp $

Method Summary
 java.lang.String[] getContextNames()
          Returns the available data context names.
 java.lang.String getCurrentContextName()
          Return the current data context name
 boolean isDefaultContext()
          Checks if the current context is the default context
 void selectContext(java.lang.String name)
          Change the current context to the named context
 void selectDefaultContext()
          Change the current context to the default context.
 
Methods inherited from interface com.iplanet.jato.model.Model
getName, getValue, getValues, setName, setValue, setValues
 

Method Detail

getCurrentContextName

public java.lang.String getCurrentContextName()
Return the current data context name

getContextNames

public java.lang.String[] getContextNames()
Returns the available data context names. These context names can be selected to be the current context.

selectContext

public void selectContext(java.lang.String name)
                   throws InvalidContextException
Change the current context to the named context
Throws:
InvalidContextException - Thrown if the provided context name does not represent an available context

selectDefaultContext

public void selectDefaultContext()
                          throws InvalidContextException
Change the current context to the default context. The default context for any given model is defined by that model.
Throws:
InvalidContextException - Thrown if the provided context name does not represent an available context

isDefaultContext

public boolean isDefaultContext()
Checks if the current context is the default context