All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.mb.ManagedBean
java.lang.Object
|
+----com.ibm.beans.mb.ManagedBean
- public class ManagedBean
- extends Object
- implements MBInstanceInterface, Serializable
This class groups MBElements together. Each ManagedBean contains
the following lists:
- a regular list of MBElements that are related to each other, and
- a common list of MBElements that cannot be directly affiliated with any
particular bean.
As in the RepositoryModel, interaction with a ManagedBean
involves calling a selectXXX() method to select a subset of
MBElements in the model, followed by a doXXX() call to perform
an operation upon the selected MBElements. Notification
support allows listeners to be informed of changes
to the selection and to the RepositoryModel.
- See Also:
- MBElements, MBModelChangeEvent, MBModelChangeListener, MBSelectionChangeEvent, MBSelectionChangeListener
-
ManagedBean()
- Constructs a ManagedBean that is
unaffiliated with a RepositoryModel.
-
ManagedBean(RepositoryModel)
- Constructs a ManagedBean
that is affiliated with the specified RepositoryModel.
-
addMBModelChangeListener(MBModelChangeListener)
- Adds a listener to the list.
-
addMBSelectionChangeListener(MBSelectionChangeListener)
- Adds a listener to the list.
-
doAdd(MBElement)
- Adds an MBElement to the ManagedBean.
-
doAdd(MBElement[])
- Adds MBElements to the ManagedBean.
-
doCommonAdd(MBElement)
- Adds an MBElement to the ManagedBean common
storage.
-
doCommonAdd(MBElement[])
- Adds an array of MBElements to the ManagedBean common
storage.
-
doCommonDelete()
- Deletes the currently selected common MBElements
from the ManagedBean.
-
doCommonGetAsMonikers()
- Gets an array of the MBMonikers of the
currently selected common MBElements in this ManagedBean.
-
doCommonGetElements()
- Gets an array of the currently selected
common MBElements in this ManagedBean.
-
doDelete()
- Deletes the currently selected MBElements from
the ManagedBean.
-
doGetAsMonikers()
- Gets an array of the MBMonikers of the
currently selected MBElements in this ManagedBean.
-
doGetElements()
- Gets an array of the currently selected
MBElements in this ManagedBean.
-
dumpMB()
-
Dumps the contents of a ManagedBean.
-
fireMBModelChangeEvent(MBModelChangeEvent)
- Distributes the event parameter to all
registered listeners.
-
fireMBSelectionChangeEvent(MBSelectionChangeEvent)
- Distributes the event parameter to all
registered listeners.
-
getAllElements()
- Gets an array of all of the MBElements in this ManagedBean.
-
getBeanCustomizerInstance()
- Gets the Customizer associated
with the ManagedBean.
-
getBeanInfoInstance()
- Gets the BeanInfo associated with the
ManagedBean.
-
getBeanInstance()
- Gets the bean associated with the ManagedBean.
-
getBeanMBMoniker()
- Gets the MBMoniker of the ManagedBean.
-
getBeanName()
- Gets the bean name of the ManagedBean.
-
getCommonMBElements()
- Gets the Vector of common MBElements
in this ManagedBean.
-
getDelegator()
- Reserved.
-
getIconInstance(int)
- Gets the icon associated with the ManagedBean.
-
getMBElements()
- Gets the Vector of MBElements in this
ManagedBean.
-
getMBInstanceImpl()
- Gets the MBInstanceInterface implementation
to which this ManagedBean is delegating instance work.
-
getRepositoryMode()
- Gets the mode of the RepositoryModel.
-
getRepositoryModel()
- Gets the RepositoryModel with which this ManagedBean
is affiliated.
-
getRepositoryName()
- Gets the name of the RepositoryModel affiliated
with this ManagedBean.
-
getSelectedCommonMBElements()
- Gets the Vector of currently
selected common MBElements in this ManagedBean.
-
getSelectedMBElements()
- Gets the Vector of currently
selected MBElements in this ManagedBean.
-
getWriteable()
- Determines whether this ManagedBean has the ability to write.
-
isDirty()
- Determines whether the ManagedBean is "dirty".
-
putManagedBean()
- Writes the ByteArray representations of the MBElements
in this ManagedBean into the working directory.
-
rawAdd(MBElement)
- Adds an MBElement to the ManagedBean.
-
rawCommonAdd(MBElement)
- Adds an MBElement to the common storage of the ManagedBean.
-
reconstituteManagedBean()
- Re-reads all of the MBElement ByteArray
information into each MBElement in this ManagedBean.
-
removeMBModelChangeListener(MBModelChangeListener)
- Removes a listener from the list.
-
removeMBSelectionChangeListener(MBSelectionChangeListener)
- Removes a listener from the list.
-
selectAll()
- Selects all of the MBElements in this
ManagedBean.
-
selectAllOfType(MBType)
- Selects all of the MBElements of a
the given type.
-
selectCommonAll()
- Selects all of the common MBElements in this
ManagedBean.
-
selectCommonAllOfType(MBType)
- Selects all of the common MBElements
of a given type.
-
selectCommonElement(MBElement)
- Selects a specific common MBElement in
this ManagedBean.
-
selectCommonNone()
- If any common MBElements are selected, this method
deselects them.
-
selectElement(MBElement)
- Selects a specific MBElement in this
ManagedBean.
-
selectNone()
- If any MBElements are selected, this method deselects them.
-
setBeanMBMoniker(MBMoniker)
- Sets the MBMoniker of this ManagedBean.
-
setBeanName(String)
- Sets the bean name of the ManagedBean.
-
setCommonMBElements(Vector)
- Sets the Vector of common MBElements
in this ManagedBean.
-
setDelegator(ManagedBean)
- Reserved.
-
setDirtyBit(boolean)
- Sets or resets the "dirty" bit.
-
setMBElements(Vector)
- Sets the Vector of MBElements in this
ManagedBean.
-
setMBInstanceImpl(MBInstanceInterface)
- Points this ManagedBean at an Object
that implements the MBInstanceInterface interface.
-
setRepositoryModel(RepositoryModel)
- Sets the RepositoryModel affiliation for this
ManagedBean.
-
setRepositoryName(String)
- Sets the name of the RepositoryModel affiliated
with this ManagedBean.
-
setSelectedCommonMBElements(Vector)
- Sets the Vector of currently
selected common MBElements in this ManagedBean.
-
setSelectedMBElements(Vector)
- Sets the Vector of currently
selected MBElements in this ManagedBean.
-
setWriteable(boolean)
- Sets or resets whether this ManagedBean has the ability to write.
-
slashesToDots(String)
- Converts a moniker
that uses slashes to one that uses period delimiters.
-
unputManagedBean(boolean)
- Removes any ByteArray representations of the MBElements
in this ManagedBean from the working directory.
-
writeManagedBean(String)
- Writes the ByteArray representations of the MBElements
in this ManagedBean into directory dir.
-
writeManagedBeanCommon(String)
- Writes the ByteArray representations of the
common MBElements in this ManagedBean into directory dir.
ManagedBean
public ManagedBean()
- Constructs a ManagedBean that is
unaffiliated with a RepositoryModel.
ManagedBean
public ManagedBean(RepositoryModel r)
- Constructs a ManagedBean
that is affiliated with the specified RepositoryModel.
- Parameters:
- r - The RepositoryModel to be associated with this
ManagedBean.
selectAll
public synchronized void selectAll()
- Selects all of the MBElements in this
ManagedBean.
- See Also:
- MBElement
selectNone
public synchronized void selectNone()
- If any MBElements are selected, this method deselects them.
- See Also:
- MBElement
selectElement
public synchronized void selectElement(MBElement e) throws IllegalAccessException
- Selects a specific MBElement in this
ManagedBean.
Any previously selected MBElements are first deselected.
- Parameters:
- e - The MBElement to be selected.
- Throws: IllegalAccessException
- Thrown if
this method attempts to index outside the range
of the Vector.
- See Also:
- MBElement
selectAllOfType
public synchronized void selectAllOfType(MBType t)
- Selects all of the MBElements of a
the given type. For example:
selectAllOfType(new MBType("com.ibm.beans.mb.MBBeanClass");
Any previously selected MBElements are first deselected.
- Parameters:
- t - The MBElement type.
- See Also:
- MBType, MBElement
selectCommonAll
public synchronized void selectCommonAll()
- Selects all of the common MBElements in this
ManagedBean.
- See Also:
- MBElement
selectCommonNone
public synchronized void selectCommonNone()
- If any common MBElements are selected, this method
deselects them.
- See Also:
- MBElement
selectCommonElement
public synchronized void selectCommonElement(MBElement e) throws IllegalAccessException
- Selects a specific common MBElement in
this ManagedBean.
Any previously selected MBElements are first deselected.
- Parameters:
- e - The common MBElement to be selected.
- Throws: IllegalAccessException
- Thrown if
this method attempts to index outside the range
of the Vector.
- See Also:
- MBElement
selectCommonAllOfType
public synchronized void selectCommonAllOfType(MBType t)
- Selects all of the common MBElements
of a given type.
Any previously selected MBElements are first deselected.
- Parameters:
- t - The common MBElement type.
- See Also:
- MBType, MBElement
doDelete
public synchronized void doDelete()
- Deletes the currently selected MBElements from
the ManagedBean. All registered ModelChange listeners are
informed of this change.
- See Also:
- MBElement
doAdd
public synchronized void doAdd(MBElement e[])
- Adds MBElements to the ManagedBean. All registered
ModelChange listeners are informed of this change.
- Parameters:
- e - An array of MBElements to add to the ManagedBean.
- See Also:
- MBElement
doAdd
public synchronized void doAdd(MBElement e)
- Adds an MBElement to the ManagedBean. All registered
ModelChange listeners are informed of this change.
- Parameters:
- e - The MBElement to add to the ManagedBean.
- See Also:
- MBElement
rawAdd
protected synchronized void rawAdd(MBElement e)
- Adds an MBElement to the ManagedBean. No registered
ModelChange listeners are informed of this change.
- Parameters:
- e - The MBElement to add to the ManagedBean.
- See Also:
- MBElement
doCommonDelete
public synchronized void doCommonDelete()
- Deletes the currently selected common MBElements
from the ManagedBean. All registered ModelChange listeners are
informed of this change.
- See Also:
- MBElement
doCommonAdd
public synchronized void doCommonAdd(MBElement e[])
- Adds an array of MBElements to the ManagedBean common
storage. These common MBElements will be added to
all of the ManagedBeans in the RepositoryModel.
All registered ModelChange listeners are informed
of this change.
- Parameters:
- e - An array of MBElements to add to the common
storage of the ManagedBean.
- See Also:
- MBElement
doCommonAdd
public synchronized void doCommonAdd(MBElement e)
- Adds an MBElement to the ManagedBean common
storage. This common MBElement will be added to
all of the ManagedBeans in the RepositoryModel.
All registered ModelChange listeners are informed
of this change.
- Parameters:
- e - The MBElement to add to the common
storage of the ManagedBean.
- See Also:
- MBElement
rawCommonAdd
protected synchronized void rawCommonAdd(MBElement e)
- Adds an MBElement to the common storage of the ManagedBean.
No registered ModelChange listeners are informed of this change.
This method does
not add the MBElement to every ManagedBean in the RepositoryModel.
- Parameters:
- e - The MBElement to add to the common storage of the ManagedBean.
- See Also:
- MBElement
doGetElements
public synchronized MBElement[] doGetElements()
- Gets an array of the currently selected
MBElements in this ManagedBean.
- Returns:
- An array of the currently selected MBElements in this
ManagedBean.
- See Also:
- MBElement
getAllElements
public synchronized MBElement[] getAllElements()
- Gets an array of all of the MBElements in this ManagedBean.
- Returns:
- An array of the currently selected MBElements in this
ManagedBean.
- See Also:
- MBElement
doGetAsMonikers
public synchronized MBMoniker[] doGetAsMonikers()
- Gets an array of the MBMonikers of the
currently selected MBElements in this ManagedBean.
- Returns:
- An array of MBMonikers of the currently selected
MBElements in this ManagedBean.
- See Also:
- MBElement, MBMoniker
doCommonGetElements
public synchronized MBElement[] doCommonGetElements()
- Gets an array of the currently selected
common MBElements in this ManagedBean.
- Returns:
- An array of the currently selected common MBElements
in this ManagedBean.
- See Also:
- MBElement
doCommonGetAsMonikers
public synchronized MBMoniker[] doCommonGetAsMonikers()
- Gets an array of the MBMonikers of the
currently selected common MBElements in this ManagedBean.
- Returns:
- An array of MBMonikers of the currently selected
common MBElements in this ManagedBean.
- See Also:
- MBElement, MBMoniker
setRepositoryModel
public synchronized void setRepositoryModel(RepositoryModel r)
- Sets the RepositoryModel affiliation for this
ManagedBean.
- Parameters:
- r - The RepositoryModel for this ManagedBean.
- See Also:
- RepositoryModel
getRepositoryModel
public RepositoryModel getRepositoryModel()
- Gets the RepositoryModel with which this ManagedBean
is affiliated.
- Returns:
- The RepositoryModel with which this ManagedBean is affiliated.
- See Also:
- RepositoryModel
setRepositoryName
public synchronized void setRepositoryName(String name)
- Sets the name of the RepositoryModel affiliated
with this ManagedBean.
- Parameters:
- name - The name of the RepositoryModel.
- See Also:
- RepositoryModel
getRepositoryName
public synchronized String getRepositoryName()
- Gets the name of the RepositoryModel affiliated
with this ManagedBean. If this ManagedBean no longer refers to a valid
RepositoryModel, this method can return a locally cached copy of the
name of the last RepositoryModel with which this ManagedBean was
last associated.
- Returns:
- The RepositoryModel name.
- See Also:
- RepositoryModel
getRepositoryMode
public synchronized int getRepositoryMode()
- Gets the mode of the RepositoryModel.
If this ManagedBean is not currently
affiliated with a RepositoryModel, this method returns a locally cached
copy of the mode of the last RepositoryModel with which it was affiliated.
- Returns:
- RepositoryModel mode. The mode is one of the following:
- RepositoryModel.READ_ONLY
- RepositoryModel.WRITE_ONLY
- RepositoryModel.READ_WRITE
Or -1 if there is no RepositoryModel affiliated with this ManagedBean.
- See Also:
- RepositoryModel
setWriteable
public synchronized void setWriteable(boolean w)
- Sets or resets whether this ManagedBean has the ability to write.
- Parameters:
- w - true if this ManagedBean is writeable, false otherwise.
getWriteable
public boolean getWriteable()
- Determines whether this ManagedBean has the ability to write.
- Returns:
- true if this ManagedBean is writeable, false otherwise.
setBeanMBMoniker
public synchronized void setBeanMBMoniker(MBMoniker m)
- Sets the MBMoniker of this ManagedBean.
- Parameters:
- m - The new MBMoniker.
getBeanMBMoniker
public MBMoniker getBeanMBMoniker()
- Gets the MBMoniker of the ManagedBean.
- Returns:
- The MBMoniker of this ManagedBean.
setBeanName
public synchronized void setBeanName(String n)
- Sets the bean name of the ManagedBean. The
bean name is the base name of all of the bean components
in this ManagedBean.
- Parameters:
- n - The new bean name.
getBeanName
public String getBeanName()
- Gets the bean name of the ManagedBean. The
bean name is the base name of all of the bean components
in this ManagedBean.
- Returns:
- The bean name of this ManagedBean.
getMBInstanceImpl
public MBInstanceInterface getMBInstanceImpl()
- Gets the MBInstanceInterface implementation
to which this ManagedBean is delegating instance work.
- Returns:
- The MBInstanceInterface implementation to which this
ManagedBean is delegating instance work.
setMBInstanceImpl
public synchronized void setMBInstanceImpl(MBInstanceInterface delegate)
- Points this ManagedBean at an Object
that implements the MBInstanceInterface interface.
- Parameters:
- delegate - An Object that implements the
MBInstanceInterface interface.
getIconInstance
public synchronized Image getIconInstance(int iconKind)
- Gets the icon associated with the ManagedBean.
- Parameters:
- iconKind - The kind of icon requested. This should be one
of the constant values
- BeanInfo.ICON_COLOR_16x16
- BeanInfo.ICON_COLOR_32x32
- BeanInfo.ICON_MONO_16x16
- BeanInfo.ICON_MONO_32x32
- Returns:
- The icon associated with the ManagedBean
- See Also:
- Image, MBInstanceImpl
getBeanInstance
public synchronized Object getBeanInstance()
- Gets the bean associated with the ManagedBean.
- Returns:
- The bean associated with the ManagedBean.
- See Also:
- Object, MBInstanceImpl
getBeanInfoInstance
public synchronized BeanInfo getBeanInfoInstance()
- Gets the BeanInfo associated with the
ManagedBean.
- Returns:
- The BeanInfo associated with the ManagedBean.
- See Also:
- BeanInfo, MBInstanceImpl
getBeanCustomizerInstance
public synchronized Customizer getBeanCustomizerInstance()
- Gets the Customizer associated
with the ManagedBean.
- Returns:
- The Customizer associated with the ManagedBean.
- See Also:
- Customizer, MBInstanceImpl
addMBModelChangeListener
public void addMBModelChangeListener(MBModelChangeListener l)
- Adds a listener to the list.
- Parameters:
- l - The listener being added.
removeMBModelChangeListener
public void removeMBModelChangeListener(MBModelChangeListener l)
- Removes a listener from the list.
- Parameters:
- l - The listener being removed.
fireMBModelChangeEvent
protected void fireMBModelChangeEvent(MBModelChangeEvent e)
- Distributes the event parameter to all
registered listeners.
- Parameters:
- e - The event being distributed.
addMBSelectionChangeListener
public void addMBSelectionChangeListener(MBSelectionChangeListener l)
- Adds a listener to the list.
- Parameters:
- l - The listener being added.
removeMBSelectionChangeListener
public void removeMBSelectionChangeListener(MBSelectionChangeListener l)
- Removes a listener from the list.
- Parameters:
- l - The listener being removed.
fireMBSelectionChangeEvent
protected void fireMBSelectionChangeEvent(MBSelectionChangeEvent e)
- Distributes the event parameter to all
registered listeners.
- Parameters:
- e - The event being distributed.
getMBElements
protected Vector getMBElements()
- Gets the Vector of MBElements in this
ManagedBean.
- Returns:
- The Vector of MBElements in this ManagedBean.
- See Also:
- MBElement
setMBElements
protected void setMBElements(Vector mbv)
- Sets the Vector of MBElements in this
ManagedBean.
- Parameters:
- mbv - The Vector of MBElements to be set in this
ManagedBean.
- See Also:
- MBElement
getSelectedMBElements
public synchronized Vector getSelectedMBElements()
- Gets the Vector of currently
selected MBElements in this ManagedBean.
- Returns:
- The Vector of currently selected MBElements in
this ManagedBean.
- See Also:
- MBElement
setSelectedMBElements
protected synchronized void setSelectedMBElements(Vector mbv)
- Sets the Vector of currently
selected MBElements in this ManagedBean.
- Parameters:
- mbv - The Vector of MBElements to be
set as selected in this ManagedBean.
- See Also:
- MBElement
getCommonMBElements
protected Vector getCommonMBElements()
- Gets the Vector of common MBElements
in this ManagedBean.
- Returns:
- The Vector of common MBElements in this ManagedBean.
- See Also:
- MBElement
setCommonMBElements
protected void setCommonMBElements(Vector mbv)
- Sets the Vector of common MBElements
in this ManagedBean.
- Parameters:
- mbv - The Vector of common MBElements to be set in this
ManagedBean.
- See Also:
- MBElement
getSelectedCommonMBElements
public synchronized Vector getSelectedCommonMBElements()
- Gets the Vector of currently
selected common MBElements in this ManagedBean.
- Returns:
- The Vector of currently selected common MBElements in
this ManagedBean.
- See Also:
- MBElement
setSelectedCommonMBElements
protected synchronized void setSelectedCommonMBElements(Vector mbv)
- Sets the Vector of currently
selected common MBElements in this ManagedBean.
- Parameters:
- mbv - The Vector of common MBElements to be
set as selected in this ManagedBean.
- See Also:
- MBElement
slashesToDots
public String slashesToDots(String s)
- Converts a moniker
that uses slashes to one that uses period delimiters. For example,
this method would convert:
com/jars/myjar
to:
com.jars.myjar
writeManagedBean
public synchronized boolean writeManagedBean(String dir)
- Writes the ByteArray representations of the MBElements
in this ManagedBean into directory dir.
- Parameters:
- dir - The target directory for the write.
- Returns:
- true if write was successful, false otherwise.
writeManagedBeanCommon
public synchronized boolean writeManagedBeanCommon(String dir)
- Writes the ByteArray representations of the
common MBElements in this ManagedBean into directory dir.
- Parameters:
- dir - The target directory for the write.
- Returns:
- true if write was successful, false otherwise.
putManagedBean
public synchronized boolean putManagedBean()
- Writes the ByteArray representations of the MBElements
in this ManagedBean into the working directory.
- Returns:
- true if write was successful, false otherwise.
unputManagedBean
public synchronized boolean unputManagedBean(boolean forceCommon)
- Removes any ByteArray representations of the MBElements
in this ManagedBean from the working directory. Note that
this unsets the "dirty bit", thus indicating that the ManagedBean
needs to be re-written to the working directory when an
instantiation request is made.
- Parameters:
- forceCommon - true to force removal of Common
MBElements, false otherwise. A user will typically
call this method with a parameter of false, which
will result in the Common MBElements being removed from the
working directory only when the ManagedBean is unaffiliated
with a RepositoryModel, or the ManagedBean is the last ManagedBean
in a RepositoryModel.
- Returns:
- true if write was successful, false otherwise.
isDirty
protected boolean isDirty()
- Determines whether the ManagedBean is "dirty". A ManagedBean is
considered to be dirty if it has changed. A dirty ManagedBean
should be written into the working directory again
when an instantiation request is made.
- Returns:
- true if "dirty", false otherwise.
setDirtyBit
protected void setDirtyBit(boolean v)
- Sets or resets the "dirty" bit. Setting a dirty bit indicates that the
ManagedBean has changed and should be written to the
working directory when an instantiation request is made.
- Parameters:
- v - true if "dirty", false otherwise.
reconstituteManagedBean
protected synchronized boolean reconstituteManagedBean()
- Re-reads all of the MBElement ByteArray
information into each MBElement in this ManagedBean.
- Returns:
- true if successful, false otherwise.
getDelegator
public ManagedBean getDelegator()
- Reserved.
setDelegator
public void setDelegator(ManagedBean mb)
- Reserved.
dumpMB
public synchronized void dumpMB()
- Dumps the contents of a ManagedBean.
All Packages Class Hierarchy This Package Previous Next Index