All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.tools.dip.MorphBeanBagModelManipulator
java.lang.Object
|
+----com.ibm.beans.tools.dip.MorphBeanBagModelManipulator
- public class MorphBeanBagModelManipulator
- extends Object
- implements MorphModelManipulator
The MorphBeanBagModelManipulator class gets the information needed from
a BeanBagModel so that a MorphController can use it.
- See Also:
- MorphModelManipulator
-
fBBM
- The BeanBagModel associated with this
MorphModelManipulator.
-
fMF
- The MessageFormatter for a
MorphBeanBagModelManipulator.
-
MorphBeanBagModelManipulator(BeanBagModel)
- Constructs an instance of MorphBeanBagModelManipulator.
-
MorphBeanBagModelManipulator(MorphModelManipulator)
- Constructs an instance of MorphBeanBagModelManipulator using the model
in a previously existing MorphModelManipulator.
-
checkNonManagedBeanError(Object, String)
- Checks to make sure a generic object is a ManagedBean.
-
finalize()
- Disposes of system resources and performs other cleanup before
garbage collection.
-
getClass(Object)
- Gets the class associated with an object in the model.
-
getClassName(ManagedBean)
- Gets the class name associated with a ManagedBean in a BeanBagModel.
-
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 represents an instance of the class.
-
loadModel(MorphViewEvent)
- Manages the loading of the model.
fBBM
protected BeanBagModel fBBM
- The BeanBagModel associated with this
MorphModelManipulator.
fMF
protected MessageFormatter fMF
- The MessageFormatter for a
MorphBeanBagModelManipulator.
MorphBeanBagModelManipulator
public MorphBeanBagModelManipulator(BeanBagModel bbm)
- Constructs an instance of MorphBeanBagModelManipulator.
- Parameters:
- bbm - The BeanBagModel to use.
MorphBeanBagModelManipulator
public MorphBeanBagModelManipulator(MorphModelManipulator mmm)
- Constructs an instance of MorphBeanBagModelManipulator using the model
in a previously existing MorphModelManipulator.
- Parameters:
- mmm - The MorphModelManipulator to use.
getModel
public Model getModel()
- Gets the model associated with this MorphModelManipulator instance.
- Returns:
- The model associated with this MorphModelManipulator instance.
getClassName
public static String getClassName(ManagedBean mbean) throws NotAClassObjectException
- Gets the class name associated with a ManagedBean in a BeanBagModel.
- Parameters:
- mbean - A ManagedBean in the BeanBagModel.
- Returns:
- The class name associated with the mbean.
- Throws: NotAClassObjectException
- Thrown if the mbean does not
represent a class object, so there is no class name.
getClassName
public String getClassName(Object obj) throws NotAClassObjectException
- Gets the class name associated with an object in the model.
- Parameters:
- obj
-
-
An object in the model.
Since this MorphModelManipulator handles objects in a
BeanBagModel, obj must be a ManagedBean instance.
- 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.
- Throws: IllegalArgumentException
- Thrown if obj is not
a ManagedBean instance.
isInstanceOf
public boolean isInstanceOf(Object obj,
Class cls)
- Determines whether the object represents an instance of the class.
The object is expected to be a ManagedBean instance in a BeanBagModel,
this method verifies the ManagedBean instance represents an instance
of the class.
- Parameters:
- obj
-
-
The object to be examined.
Since this MorphModelManipulator handles objects in a
BeanBagModel, obj must be a ManagedBean instance.
- cls - The class used to check the object.
- Returns:
-
true
if obj represents an instance of
cls; false
otherwise.
- Throws: IllegalArgumentException
- Thrown if obj is not
a ManagedBean instance.
getClass
public Class getClass(Object obj) throws ClassNotFoundException, NotAClassObjectException
- Gets the class associated with an object in the model.
- Parameters:
- obj
-
-
An object in the model.
Since this MorphModelManipulator handles objects in a
BeanBagModel, obj must be a ManagedBean instance.
- 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.
- Throws: IllegalArgumentException
- Thrown if obj is not
a ManagedBean instance.
getURLName
public 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 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 BeanBagModel.
If the classIndex is valid, this method will first
check the corresponding object using
the same index in the BeanBagModel to see if they have the
same className. If not, then a search through the
entire BeanBagModel will be done to find the className.
- Returns:
- The URL string for the className.
- Throws: NoRepositoryFoundException
- Thrown if no URL could be found for
className.
loadModel
public void loadModel(MorphViewEvent evt)
- Manages the loading of the model.
- Parameters:
- evt - The MorphViewEvent with the information needed to load
the model.
checkNonManagedBeanError
protected void checkNonManagedBeanError(Object obj,
String methodName)
- Checks to make sure a generic object is a ManagedBean. Since
BeanBagModels only hold ManagedBean's, it is an error if a
non-ManagedBean object is passed to a MorphBeanBagModelManipulator
instance.
- Parameters:
- obj - The generic object to be checked.
- methodName
-
-
The MorphBeanBagModelManipulator method name calling
this method.
- Throws: IllegalArgumentException
- Thrown if obj is not
a ManagedBean instance.
finalize
protected void finalize() throws Throwable
- Disposes of system resources and performs other cleanup before
garbage collection.
- Throws: Throwable
- Not thrown directly by this logic.
- Overrides:
- finalize in class Object
All Packages Class Hierarchy This Package Previous Next Index