Oracle Data-aware Controls Reference

oracle.dacf.control
Class ControlSupportHC

java.lang.Object
  extended byoracle.dacf.util.InfoBusMemberHelper
      extended byoracle.dacf.control.ConsumerSupport
          extended byoracle.dacf.control.ControlSupport
              extended byoracle.dacf.control.ControlSupportHC
All Implemented Interfaces:
oracle.dacf.rp.Consumer, java.util.EventListener, javax.infobus.InfoBusDataConsumer, javax.infobus.InfoBusEventListener, InfoBusManagerListener, javax.infobus.InfoBusMember, oracle.dacf.rp.Participant, java.beans.PropertyChangeListener

public class ControlSupportHC
extends ControlSupport
implements javax.infobus.InfoBusDataConsumer, oracle.dacf.rp.Consumer

A variant of ControlSupport to support controls that utilize a hierarchy of DataItems. The assumption is that DataItem[n+1] is dependent upon DataItem[n] for all n >= 0.


Field Summary
 
Fields inherited from class oracle.dacf.control.ControlSupport
_control, _dataItemName, _enabledListeners, _infoBusName, _navigatedListeners, _navigatingListeners
 
Fields inherited from class oracle.dacf.util.InfoBusMemberHelper
m_infoBus, m_propListeners, m_sourceRef, m_syncLock, m_vetoListeners
 
Constructor Summary
ControlSupportHC(Control control)
          Constructs the support object for a given data aware control.
 
Method Summary
 void addDataItemName(java.lang.String dataItemName)
           
 void addDataItemNames(java.lang.String[] dataItemNames)
           
 void available(java.lang.String name, java.lang.Object publishedObject)
           
 void dataItemAvailable(javax.infobus.InfoBusItemAvailableEvent event)
          This method is called by the InfoBus class on behalf of a data producer that is announcing the availability of a new data item by name.
 void dataItemRevoked(javax.infobus.InfoBusItemRevokedEvent event)
          This method is called by the InfoBus class on behalf of a data producer that is revoking the availability of a previously announced data item.
 java.lang.Object getDataItem()
          Returns the first InfoBus DataItem bound to this control.
 java.lang.Object getDataItem(java.lang.String name)
          Returns the InfoBus DataItem specified by name.
 java.lang.String getDataItemName()
          Returns the name of the first InfoBus DataItem bound to this control.
 java.lang.String[] getDataItemNames()
          Returns the names of all InfoBus DataItems bound to this control.
 java.lang.Object[] getDataItems()
          Returns the InfoBus DataItems bound to this control.
 void releaseResources(InfoBusManagerReleaseEvent e)
          A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.
 void revoked(java.lang.String name, java.lang.Object publishedObject)
           
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the first InfoBus DataItem bound to this control.
 void setDataItemNames(java.lang.String[] dataItemNames)
           
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this control is connected to.
 
Methods inherited from class oracle.dacf.control.ControlSupport
_setDataItem, _updateEnabled, addControlEnabledListener, addNavigatedListener, addNavigatingListener, finalize, getInfoBusName, handleRequestFocus, isEnabled, isFocusValidated, processNavigatedEvent, processNavigatingEvent, propertyChange, removeControlEnabledListener, removeNavigatedListener, removeNavigatingListener, setEnabled, setFocusValidated
 
Methods inherited from class oracle.dacf.util.InfoBusMemberHelper
addInfoBusPropertyListener, addInfoBusVetoableListener, clearRef, getInfoBus, joinInfoBus, joinInfoBus, leaveInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

ControlSupportHC

public ControlSupportHC(Control control)
Constructs the support object for a given data aware control.

Parameters:
control - The data aware control.
Method Detail

setInfoBusName

public void setInfoBusName(java.lang.String infoBusName)
Sets the name of the InfoBus this control is connected to.

By default, the control is connected to the default InfoBus, named Control.DEFAULT_INFOBUS_NAME.

If the named InfoBus does not exist, it is created automatically.

If the control is already connected to an InfoBus, it is disconnected first.

Overrides:
setInfoBusName in class ControlSupport
Parameters:
infoBusName - The name of the InfoBus to connect to.
See Also:
Control.DEFAULT_INFOBUS_NAME, Control.setInfoBusName(java.lang.String)

getDataItemName

public java.lang.String getDataItemName()
Returns the name of the first InfoBus DataItem bound to this control.

Overrides:
getDataItemName in class ControlSupport
Returns:
The name of the first InfoBus DataItem bound to this control, or null if the control is unbound.
See Also:
getDataItem(), Control.getDataItemName()

getDataItemNames

public java.lang.String[] getDataItemNames()
Returns the names of all InfoBus DataItems bound to this control.

Returns:
The names of all InfoBus DataItems bound to this control, or null if the control is unbound.
See Also:
getDataItem(), Control.getDataItemName()

setDataItemName

public void setDataItemName(java.lang.String dataItemName)
Sets the name of the first InfoBus DataItem bound to this control.

The DataItem with the given name is searched for on the InfoBus, and if found, is bound to this control.

If the control is already bound to one or more DataItems, it is first unbound to those dataitems.

Overrides:
setDataItemName in class ControlSupport
Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
setDataItemNames(java.lang.String[]), getDataItemNames(), getDataItem(), getDataItems(), Control.setDataItemName(java.lang.String)

setDataItemNames

public void setDataItemNames(java.lang.String[] dataItemNames)

addDataItemNames

public void addDataItemNames(java.lang.String[] dataItemNames)

addDataItemName

public void addDataItemName(java.lang.String dataItemName)

getDataItem

public final java.lang.Object getDataItem()
Returns the first InfoBus DataItem bound to this control.

Overrides:
getDataItem in class ControlSupport
Returns:
The InfoBus DataItem bound to this control, or null if the control is unbound.
See Also:
Control.getDataItem()

getDataItem

public final java.lang.Object getDataItem(java.lang.String name)
Returns the InfoBus DataItem specified by name.

Parameters:
name - the name of the requested dataitem
Returns:
The InfoBus DataItem bound to this control, or null if the dataitem is not bound.
See Also:
Control.getDataItem()

getDataItems

public final java.lang.Object[] getDataItems()
Returns the InfoBus DataItems bound to this control.

Returns:
The InfoBus DataItems bound to this control, or null if the control is unbound.
See Also:
Control.getDataItem()

releaseResources

public void releaseResources(InfoBusManagerReleaseEvent e)
Description copied from interface: InfoBusManagerListener
A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.

Specified by:
releaseResources in interface InfoBusManagerListener
Overrides:
releaseResources in class ControlSupport

available

public void available(java.lang.String name,
                      java.lang.Object publishedObject)
Specified by:
available in interface oracle.dacf.rp.Consumer
Overrides:
available in class ConsumerSupport

revoked

public void revoked(java.lang.String name,
                    java.lang.Object publishedObject)
Specified by:
revoked in interface oracle.dacf.rp.Consumer
Overrides:
revoked in class ConsumerSupport

dataItemAvailable

public void dataItemAvailable(javax.infobus.InfoBusItemAvailableEvent event)
This method is called by the InfoBus class on behalf of a data producer that is announcing the availability of a new data item by name.

If the control is not currently bound to a data item, and the name of the new data item matches the control's data item name, then the control is bound to the new data item.

If the control is not currently bound to a data item, and the name of the new data item is a prefix for the control's data item name, then the InfoBus is searched for a matching data item, and the control is bound to it if one is found. For example, if the item A.B.C is announced as available, and the control's data item name is set to A.B.C.D.E, the control will ask the InfoBus to find the data item A.B.C.D.E in response to the announcement of A.B.C -- this means that producers only need to publish their root prefix, and allows them to create child producers on demand.

Specified by:
dataItemAvailable in interface javax.infobus.InfoBusDataConsumer
Overrides:
dataItemAvailable in class ControlSupport
Parameters:
event - The event.

dataItemRevoked

public void dataItemRevoked(javax.infobus.InfoBusItemRevokedEvent event)
This method is called by the InfoBus class on behalf of a data producer that is revoking the availability of a previously announced data item.

If the name of the data item in the event matches the control's data item name, the control is unbound from its data item.

Specified by:
dataItemRevoked in interface javax.infobus.InfoBusDataConsumer
Overrides:
dataItemRevoked in class ControlSupport
Parameters:
event - The event.

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.