Oracle Data-aware Controls Reference

oracle.dacf.control
Class DataItemAccessHelper

java.lang.Object
  extended byoracle.dacf.util.InfoBusMemberHelper
      extended byoracle.dacf.control.ConsumerSupport
          extended byoracle.dacf.control.DataItemAccessHelper
All Implemented Interfaces:
oracle.dacf.rp.Consumer, java.util.EventListener, javax.infobus.InfoBusDataConsumer, javax.infobus.InfoBusEventListener, javax.infobus.InfoBusMember, oracle.dacf.rp.Participant, java.beans.PropertyChangeListener
Direct Known Subclasses:
FindItemModelImpl, IBReturnItemHelper, ReturnItemNameListener

public class DataItemAccessHelper
extends ConsumerSupport
implements javax.infobus.InfoBusDataConsumer

This class provides support to help access a data item.

Version:
INTERNAL

Field Summary
 
Fields inherited from class oracle.dacf.util.InfoBusMemberHelper
m_infoBus, m_propListeners, m_sourceRef, m_syncLock, m_vetoListeners
 
Constructor Summary
DataItemAccessHelper()
          Constructor
 
Method Summary
protected  void _setDataItem(java.lang.Object dataItem)
          Binds to a data item.
 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.
protected  void dataItemPublished()
          This method gets called wheneve the data item is published.
 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()
          return the data item the object is currently bound to.
 java.lang.String getDataItemName()
           
 java.lang.String getInfoBusName()
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when the object's InfoBus property is changed.
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the InfoBus DataItem this object is bound to.
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this transaction monitor is connected to.
 
Methods inherited from class oracle.dacf.control.ConsumerSupport
available, revoked
 
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataItemAccessHelper

public DataItemAccessHelper()
Constructor

Method Detail

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.

Specified by:
dataItemAvailable in interface javax.infobus.InfoBusDataConsumer

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.

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

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
This method gets called when the object's InfoBus property is changed.

The object is removed as a data consumer from its previous InfoBus, and is added as a consumer to its new InfoBus.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - The event.

setInfoBusName

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

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

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

Parameters:
infoBusName - The name of the InfoBus to connect to.

getInfoBusName

public java.lang.String getInfoBusName()

dataItemPublished

protected void dataItemPublished()
This method gets called wheneve the data item is published. Derived class can override this method to initialize. For ex., when the data item is published you can look at its SQL type (for ImmediateAccess/AttributeInfo's)

See Also:
dataItemAvailable(), FindItemModelImpl

_setDataItem

protected void _setDataItem(java.lang.Object dataItem)
Binds to a data item.

Specified by:
_setDataItem in class ConsumerSupport
Parameters:
dataItem - The new data item to bind to.

setDataItemName

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

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

If the object is already bound to a DataItem, it is unbound first.

Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
getDataItem()

getDataItemName

public java.lang.String getDataItemName()

getDataItem

public java.lang.Object getDataItem()
return the data item the object is currently bound to.

Specified by:
getDataItem in class ConsumerSupport
Returns:
the data item which the object is currently bound to.

Oracle Data-aware Controls Reference

 

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