All Packages Class Hierarchy This Package Previous Next Index
Interface com.ibm.beans.tools.dip.MorphModelManipulator
- public interface interface MorphModelManipulator
The MorphModelManipulator interface defines the information needed by
a MorphController instance that can not be retrieved from the
Model interface. The Model
interface defines the generic logic implemented by any model. But
the MorphController needs more information than that. This interface
defines the additional information the MorphController needs from any
model, without having a specific model implementation hardcoded in
the MorphController class. Each implementation of the Model interface
must also be able to provide the information specified in the
MorphModelManipulator interface if it is to be used with the
MorphController class.
- See Also:
- MorphController, Model
-
getClass(Object)
- Gets the class associated with an object in the model.
-
getClassName(Object)
- Gets the class name associated with an object in the model.
-
getModel()
- Gets the model associated with this MorphModelManipulator instance.
-
getURLName(String, int)
- Gets the URL name associated with a class name for an object in the
model.
-
isInstanceOf(Object, Class)
- Determines whether the object in the model represents an instance of
the class.
-
loadModel(MorphViewEvent)
- Manages the loading of the model.
getModel
public abstract Model getModel()
- Gets the model associated with this MorphModelManipulator instance.
- Returns:
- The model associated with this MorphModelManipulator instance.
getClassName
public abstract String getClassName(Object obj) throws NotAClassObjectException
- Gets the class name associated with an object in the model.
- Parameters:
- obj - An object in the model.
- Returns:
- The class name associated with the obj.
- Throws: NotAClassObjectException
- Thrown if the obj does not
represent a class object, so there is no class name.
isInstanceOf
public abstract boolean isInstanceOf(Object obj,
Class cls)
- Determines whether the object in the model represents an instance of
the class.
- Parameters:
- obj - The object in the model to be examined.
- cls - The class used to check the object.
- Returns:
-
true
if obj represents an instance of
cls; false
otherwise.
getClass
public abstract Class getClass(Object obj) throws ClassNotFoundException, NotAClassObjectException
- Gets the class associated with an object in the model.
- Parameters:
- obj - An object in the model.
- Returns:
- The class associated with the obj.
- Throws: NotAClassObjectException
- Thrown if the obj does not
represent a class object, so there is no class.
- Throws: ClassNotFoundException
- Thrown if the class object
could not be found.
getURLName
public abstract String getURLName(String className,
int classIndex) throws NoRepositoryFoundException
- Gets the URL name associated with a class name for an object in the
model.
- Parameters:
- className - The class name for an object in the model.
- classIndex
-
-
The optional index for the class name.
This index represents
the index number for the className in the MorphView
implementation, and possibly the same index in the model.
The implementation of this method could use this
classIndex to
check the corresponding object using
the same index in the model to see if they have the
same className. This parameter allows the same
className to appear multiple times in the model, but
in different repositories.
- Returns:
- The URL string for the className.
- Throws: NoRepositoryFoundException
- Thrown if no URL could be found for
className.
loadModel
public abstract void loadModel(MorphViewEvent evt)
- Manages the loading of the model.
- Parameters:
- evt - The MorphViewEvent with the information needed to load
the model.
All Packages Class Hierarchy This Package Previous Next Index