Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class ProducerObject

java.lang.Object
  extended byoracle.dacf.dataset.DacObject
      extended byoracle.dacf.dataset.ProducerObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
InfoObject, PropertyInfo, QueryCriteria, QueryCriteriaAttribute

public abstract class ProducerObject
extends DacObject
implements java.lang.Cloneable

This class is the base class for all class that make DataItems available on the InfoBus. It defines the basic mechanisms for:

Version:
SDK: since JDeveloper 3.1

Field Summary
protected  java.lang.Object _openLock
           
 
Fields inherited from class oracle.dacf.dataset.DacObject
EMPTY_PREFIX, INITIAL_CAPACITY, ITEMNAME_DELIMITER
 
Constructor Summary
protected ProducerObject()
           
protected ProducerObject(java.lang.String name)
           
protected ProducerObject(java.lang.String n, ProducerObject p, ProducerObject[] c)
           
 
Method Summary
 void addChild(ProducerObject child)
          Add a column to the ResultSetInfo.
protected  void addClonedDataItem(DataItemImpl di)
          Add a cloned ScrollableRowsetAccess to the ResultSetInfo.
 java.lang.Object clone()
          Clones the DacObject.
 void close()
          Generic method for disconnecting the Producer objects from the server objects and revoking any consumed DataItems
protected abstract  void closeCheck()
          Checks to see if close is permitted.
protected abstract  void closeChildren()
          A subclass specific method for disconnecting the child objects from their server objects counterparts.
protected abstract  void closeDataItems()
          A subclass specific method for disconnecting and revoking Dataitems Internal to the framework; should never be called by client classes
protected abstract  void closeProducerObject()
          A subclass specific method for disconnecting the client object from the appropriate server objects.
protected  javax.infobus.DataItem findDataItem(java.lang.String name)
          Finds the DataItem indicated by name.
protected  ProducerObject findProducerObject(ItemNameTokenizer tokenizer)
          Internal: Applications should not use this method.
protected  ProducerObject findProducerObject(java.lang.String dataItemName)
          Finds the ProducerObject corresponding to dataItemName.
protected  DataItemImpl[] getClonedDataItems()
          Retrieves the list of cloned ScrollableRowsetAccess for the ResultSetInfo.
protected  javax.infobus.DataItem getDataItem()
          Returns this object's DataItem.
protected  DataItemImpl getDataItemImpl()
          Used internally to accesses a DataItem and test for null.
protected  javax.infobus.InfoBusDataProducer getDataProducer()
          Returns a reference to the InfoBusDataProducer.
 java.lang.String getDataSourceName()
          Returns the name of the data source.
 java.lang.String getFullName()
          Returns the full name of the ProducerObject.
protected  boolean isAClonedDataItem(DataItemImpl di)
          Returns true if the DataItemImpl is on the cloned dataitem list.
 boolean isOpen()
          Returns true if the ProducerObject has been opened.
 void open(boolean openChildren)
          Generic method for connecting the producer objects to the server objects.
protected abstract  void openChildren()
          A subclass specific method for connecting the child objects to their server counterparts.
protected abstract  void openDataItems()
          A subclass specific method for connecting the Dataitems Internal to the framework; should never be called by client classes
protected abstract  void openProducerObject()
          A subclass specific method for connecting the client object from the appropriate server objects.
 void publishDataItem()
          Publishes the DataItem associated with the ProducerObject.
 void publishDataItem(boolean publishKids)
          Publishes the DataItem associated with the ProducerObject.
protected  void removeChild(ProducerObject child)
          remove a child from the ProducerObject.
protected  void removeClonedDataItem(DataItemImpl di)
          Remove a cloned ScrollableRowsetAccess from the ResultSetInfo.
 void revokeDataItem()
          Revokes the DataItem associated with the ProducerObject.
protected  void setClonedDataItems(DataItemImpl[] diList)
          Initializes the list of cloned ScrollableRowsetAccess for the ResultSetInfo.
protected  void setDataItem(javax.infobus.DataItem nuDataItem)
          Sets this object's DataItem.
 void setDataSourceName(java.lang.String nuDataSourceName)
          Sets the name of the data source.
 void setName(java.lang.String name)
          Sets the InfoBus bind name of the object.
protected  void setOpen(boolean isopen)
          Sets the open state of the ProducerObject.
 
Methods inherited from class oracle.dacf.dataset.DacObject
addChild, findDescendant, genCloneName, getChild, getChildIndex, getChildren, getName, getNumOfChildren, getParent, getPrefix, insertChildAt, removeChild, removeChildren, setChildren, setParent, setPrefix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_openLock

protected transient java.lang.Object _openLock
Constructor Detail

ProducerObject

protected ProducerObject()

ProducerObject

protected ProducerObject(java.lang.String name)

ProducerObject

protected ProducerObject(java.lang.String n,
                         ProducerObject p,
                         ProducerObject[] c)
Method Detail

clone

public java.lang.Object clone()
Clones the DacObject.

The returned clone will not be open. The clone must be opened via open() prior to use.

Overrides:
clone in class DacObject
Returns:
the clone
See Also:
open(boolean openChildren)

addChild

public void addChild(ProducerObject child)
Add a column to the ResultSetInfo. overrides the addChild() method in DacObject

See Also:
DacObject.addChild(oracle.dacf.dataset.DacObject)

removeChild

protected void removeChild(ProducerObject child)
remove a child from the ProducerObject. overrides the removeChild() method in DacObject

See Also:
DacObject.removeChild(oracle.dacf.dataset.DacObject)

open

public void open(boolean openChildren)
Generic method for connecting the producer objects to the server objects.

Parameters:
openChildren - true: open all of the child objects.

openProducerObject

protected abstract void openProducerObject()
A subclass specific method for connecting the client object from the appropriate server objects. Internal to the framework; should never be called by client classes


openChildren

protected abstract void openChildren()
A subclass specific method for connecting the child objects to their server counterparts. Internal to the framework; should never be called by client classes


openDataItems

protected abstract void openDataItems()
A subclass specific method for connecting the Dataitems Internal to the framework; should never be called by client classes


close

public void close()
Generic method for disconnecting the Producer objects from the server objects and revoking any consumed DataItems


closeCheck

protected abstract void closeCheck()
Checks to see if close is permitted.

Internal to the framework; should never be called by client classes

Throws:
DataSourceOperationException - Occurs when closing isn't allowed.

closeProducerObject

protected abstract void closeProducerObject()
A subclass specific method for disconnecting the client object from the appropriate server objects. Internal to the framework; should never be called by client classes


closeChildren

protected abstract void closeChildren()
A subclass specific method for disconnecting the child objects from their server objects counterparts. Internal to the framework; should never be called by client classes


closeDataItems

protected abstract void closeDataItems()
A subclass specific method for disconnecting and revoking Dataitems Internal to the framework; should never be called by client classes


findProducerObject

protected ProducerObject findProducerObject(java.lang.String dataItemName)
Finds the ProducerObject corresponding to dataItemName.

Parameters:
dataItemName - fully qualified DataItem name.
Returns:
ProducerObject corresponding to the given item name.

findProducerObject

protected ProducerObject findProducerObject(ItemNameTokenizer tokenizer)
Internal: Applications should not use this method.

This method can cause unpredictable results. Used by findProducerObject(String dataItemName).

See Also:
findProducerObject(String dataItemName)

isOpen

public boolean isOpen()
Returns true if the ProducerObject has been opened.

Returns:
true if the ProducerObject has been opened.

setOpen

protected void setOpen(boolean isopen)
Sets the open state of the ProducerObject.

Parameters:
isopen - ture if the ProducerObject has been opened.

setName

public void setName(java.lang.String name)
Sets the InfoBus bind name of the object.

Overrides:
setName in class DacObject
Parameters:
name - the InfoBus bind name.

setDataSourceName

public void setDataSourceName(java.lang.String nuDataSourceName)
Sets the name of the data source.

Parameters:
nuDataSourceName - the name of the data source.
See Also:
getDataSourceName()

getDataSourceName

public java.lang.String getDataSourceName()
Returns the name of the data source.

Returns:
the name of the data source.
See Also:
setDataSourceName(String nuDataSourceName)

getFullName

public java.lang.String getFullName()
Returns the full name of the ProducerObject.

The full name has the form session/iterator/column.

Returns:
the full name of the ProducerObject.

revokeDataItem

public void revokeDataItem()
Revokes the DataItem associated with the ProducerObject.

All consumers of the DataItem must stop using it. Any attempt to access a DataItem after it has been revoked will produce undefined results.

If the DataItem is published again, it will refresh itself based upon its new value.


publishDataItem

public void publishDataItem()
Publishes the DataItem associated with the ProducerObject.

all InfoBus listeners will be notified that the DataItem object has become available for consumption.

This method unconditionally publishes the DataItems for all child objects.

A published but unopend DataItem will be un retrievable by InfoBus consumers. The recommend steps are 1) open the object and 2) publish it.


publishDataItem

public void publishDataItem(boolean publishKids)
Publishes the DataItem associated with the ProducerObject.

if true, it will also publish the DataItems for all child objects. If false, the method will not publish the child objects.

A published but unopend DataItem will be un retrievable by InfoBus consumers. The recommend steps are 1) open the object and 2) publish it.

Parameters:
publishKids - if true, descends down the containment heirarchy, publishing the DataItems for all child objects.

findDataItem

protected javax.infobus.DataItem findDataItem(java.lang.String name)
Finds the DataItem indicated by name.

The name is generally of the form: oracle/Session/Iterator/Column and will contain that portion that has yet to be resolved.

Returns:
the requested dataitem if it exists, it has been opened and it has been published.

getDataItem

protected javax.infobus.DataItem getDataItem()
Returns this object's DataItem.

A side effect of getDataItem is that if the DataItem does not already exist, it will be created.

This method in all cases will be overridden to handle the particulars of creating the specific type of DataItem associated with each subclass.


getDataItemImpl

protected DataItemImpl getDataItemImpl()
Used internally to accesses a DataItem and test for null. Unlike getDataItem, it does not create a DataItem if it does not already exist.

See Also:
getDataItem()

setDataItem

protected void setDataItem(javax.infobus.DataItem nuDataItem)
Sets this object's DataItem.

This method will first revoke the current DataItem if is has been created.

Parameters:
nuDataItem - the new DataItem to be associated with this ProducerObject.

addClonedDataItem

protected void addClonedDataItem(DataItemImpl di)
Add a cloned ScrollableRowsetAccess to the ResultSetInfo.

A cloned ScrollableRowsetAccess is a ScrollableRowsetAccess that exposes the ResultSetInfo under a bind name other than the ResultSetInfo's.

Parameters:
di - The DataItem to be added.

removeClonedDataItem

protected void removeClonedDataItem(DataItemImpl di)
Remove a cloned ScrollableRowsetAccess from the ResultSetInfo.

A cloned ScrollableRowsetAccess is a ScrollableRowsetAccess that exposes the ResultSetInfo under a bind name other than the ResultSetInfo's.

Parameters:
di - The DataItem to be removed.

isAClonedDataItem

protected boolean isAClonedDataItem(DataItemImpl di)
Returns true if the DataItemImpl is on the cloned dataitem list.

Returns:
True if the DataItemImpl is on the cloned dataitem list

getClonedDataItems

protected DataItemImpl[] getClonedDataItems()
Retrieves the list of cloned ScrollableRowsetAccess for the ResultSetInfo.

A cloned ScrollableRowsetAccess is a ScrollableRowsetAccess that exposes the ResultSetInfo under a bind name other than the ResultSetInfo's.

Returns:
The list of cloned DataItems.

setClonedDataItems

protected void setClonedDataItems(DataItemImpl[] diList)
Initializes the list of cloned ScrollableRowsetAccess for the ResultSetInfo.

A cloned ScrollableRowsetAccess is a ScrollableRowsetAccess that exposes the ResultSetInfo under a bind name other than the ResultSetInfo's.

Parameters:
diList - The list of cloned DataItems.

getDataProducer

protected javax.infobus.InfoBusDataProducer getDataProducer()
Returns a reference to the InfoBusDataProducer. The InfoBusDataProducer listens for, and responds to, item requests.

Returns:
a reference to the InfoBusDataProducer.

Oracle Data-aware Controls Reference

 

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