|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ilog.server.jsds.IlsDataSource
Abstract class to be shared by all data sources. Provides support for batch and property-change listeners and for data source connection/disconnection listeners.
Provides also support for editing data source properties and managing batch
updates to the back-end. Note that the execution of all methods prefixed with
ds are asynchronous and, therefore, may not be immediately
reflected in the local model. A data source is identified by its label and
view name.
IlDataSource,
IlDataSourceEditor,
IlsDataSourceContainer| Field Summary | |
protected java.util.Map |
_properties
Properties of the data source. |
protected java.beans.PropertyChangeSupport |
_propertyChangeListeners
Support for PropertyChangeListener. |
| Constructor Summary | |
protected |
IlsDataSource()
Instantiate a new data source. |
| Method Summary | |
void |
addBatchListener(BatchListener l)
Adds a listener for all batch events |
void |
addDataSourceListener(DataSourceListener l)
Adds a listener for all data-source object events. |
void |
addDSConnectionListener(DSConnectionListener l)
Adds a listener for all data-source connection/disconnection events. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
protected void |
dataSourceChange(java.lang.Object dso,
java.util.Map properties)
Invoked by subclasses to notify that properties on the data source have changed. |
void |
dataSourceConnected(IlsDSMainObject dso)
This method is invoked when the data source is connected (view is opened). |
void |
dataSourceDisconnected()
This method is invoked when the data source is disconnected (view is closed). |
void |
dsClose()
Close the view represented by the container that contains the data source. |
void |
dsDereference(java.lang.Object object,
java.lang.String propertyName,
IlsDataSourceContainer dsc,
boolean force)
Excluded. |
void |
dsDereference(java.lang.Object object,
java.lang.String propertyName,
int dscIndex,
boolean force)
Excluded. |
void |
dsEndBatch()
Notifies the datasource that the updates are finished. |
boolean |
dsExecCallback(java.lang.String funName,
MvValue[] argv)
This method executes a given function in asynchronous mode on the Server object associated with the data source representation object. |
boolean |
dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv)
Same as dsExecDuplexCallback(funName, argv, duplexFunName, duplexArgv, 0, true) |
boolean |
dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv,
int resultIndex)
Same as dsExecDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, true) |
boolean |
dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv,
int resultIndex,
boolean inTrans)
This callback executes an asynchronous call to the funName
function on the Server object associated with the assocoated
representation object. |
void |
dsStartBatch()
Notifies the datasource that some updates will take place. |
void |
dsUpdateProperty(java.lang.String name,
java.lang.Object value)
Requests the server to update a data source property. |
void |
endBatch()
Excluded. |
IlsDataSourceContainer |
getDataSourceContainer()
|
int |
getDSBatchLevel()
Gets the level to which outgoing batches are currently nested. |
IlsDSComponent |
getDSComponent()
|
abstract IlsDSMainObject |
getDSMainObject()
|
java.util.Map |
getDSProperties()
Access all the datasource properties |
java.lang.Object |
getDSProperty(java.lang.String propertyName)
Get value of specified property. |
IlsDSRepresentation |
getDSRepresentation()
|
java.lang.String |
getLabel()
|
java.lang.String |
getViewName()
|
protected boolean |
isDSObjectPropertyEditable(java.lang.Object obj,
java.lang.String propertyName)
|
protected boolean |
isDSObjectPropertyHRef(java.lang.Object obj,
java.lang.String propertyName)
|
boolean |
isEditable()
Gets whether the data source is read only or not |
boolean |
isInEdition()
|
void |
removeBatchListener(BatchListener l)
Removes a listener for all batch events |
void |
removeDataSourceListener(DataSourceListener l)
Removes a listener for all data-source object events. |
void |
removeDSConnectionListener(DSConnectionListener l)
Removes a listener for all data-source connection/disconnection events. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setDataSourceContainer(IlsDataSourceContainer dsc)
Set the container of the data source. |
void |
setLabel(java.lang.String name)
Set the label of the data source. |
void |
setRpStatus(int rpStatus)
Set the representation status of the associated representation object. |
void |
setViewName(java.lang.String viewName)
Set the data source view name. |
void |
startBatch()
Excluded. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.beans.PropertyChangeSupport _propertyChangeListeners
PropertyChangeListener.protected java.util.Map _properties
| Constructor Detail |
protected IlsDataSource()
| Method Detail |
public void addBatchListener(BatchListener l)
addBatchListener in interface IlDataSourcel - the listenerBatchListenerpublic void removeBatchListener(BatchListener l)
removeBatchListener in interface IlDataSourcel - the listenerBatchListenerpublic void addDataSourceListener(DataSourceListener l)
addDataSourceListener in interface IlDataSourcel - the listenerDataSourceListenerpublic void removeDataSourceListener(DataSourceListener l)
removeDataSourceListener in interface IlDataSourcel - the listenerDataSourceListenerpublic void addDSConnectionListener(DSConnectionListener l)
addDSConnectionListener in interface IlsDSConnectionl - the listenerDSConnectionListenerpublic void removeDSConnectionListener(DSConnectionListener l)
removeDSConnectionListener in interface IlsDSConnectionl - the listenerDSConnectionListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to be added
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The name of the property to listen on.listener - The PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
The - PropertyChangeListener to be removed.
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The name of the property that was listened on.listener - The PropertyChangeListener to be removed.public void dsStartBatch()
dsStartBatch in interface IlDataSourceEditorIlDataSourceEditor.dsStartBatch()public void dsEndBatch()
dsEndBatch in interface IlDataSourceEditorIlDataSourceEditor.dsEndBatch()public int getDSBatchLevel()
getDSBatchLevel in interface IlDataSourceEditorIlDataSourceEditor.getDSBatchLevel()public boolean isInEdition()
true if the data source is in edition.
getDSBatchLevel() > 0getDSBatchLevel()
public void dsUpdateProperty(java.lang.String name,
java.lang.Object value)
dsUpdateProperty in interface IlDataSourceEditorname - The name of the propertyvalue - The new value of the propertyIlDataSourceEditor.dsUpdateProperty(java.lang.String, java.lang.Object)public void dsClose()
IlsDataSourceContainerpublic void startBatch()
public void endBatch()
public void dataSourceConnected(IlsDSMainObject dso)
DSConnectionListenerpublic void dataSourceDisconnected()
DSConnectionListener
protected void dataSourceChange(java.lang.Object dso,
java.util.Map properties)
DataSourceEvent on all the data source
listener.public abstract IlsDSMainObject getDSMainObject()
public boolean isEditable()
isEditable in interface IlDataSourceEditorIlDataSourceEditor.isEditable()public java.lang.String getLabel()
public void setLabel(java.lang.String name)
name - the data source labelIlsDSMainObject.match(ilog.server.jsds.IlsDataSource)public java.lang.String getViewName()
public void setViewName(java.lang.String viewName)
viewName - the data source view nameIlsDSMainObject.match(ilog.server.jsds.IlsDataSource)public IlsDataSourceContainer getDataSourceContainer()
public void setDataSourceContainer(IlsDataSourceContainer dsc)
dsc - The new container.public java.lang.Object getDSProperty(java.lang.String propertyName)
getDSProperty in interface IlDataSourcepropertyName - the property name.public java.util.Map getDSProperties()
getDSProperties in interface IlDataSourcepublic IlsDSRepresentation getDSRepresentation()
public IlsDSComponent getDSComponent()
public void dsDereference(java.lang.Object object,
java.lang.String propertyName,
int dscIndex,
boolean force)
public void setRpStatus(int rpStatus)
RpObject.setRpStatus(int)
public boolean dsExecCallback(java.lang.String funName,
MvValue[] argv)
funName - The function name.argv - The arguments.false if the request callback couldn't be sent,
true otherwise.RpObject.execCallback(java.lang.String, ilog.server.jcomp.MvValue[])
public boolean dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv,
int resultIndex,
boolean inTrans)
funName
function on the Server object associated with the assocoated
representation object. The result of the function is sent back to the
caller through a call to the duplex global function
duplexFunName.funName - The function name to invokeargv - The arguments passed to the function funNameduplexFunName - The duplex global function nameduplexArgv - The duplex global function argumentsresultIndex - The result of the funName function will be put
at the resultIndex position in the array of
arguments to the duplex functioninTrans - this parameter indicates if the callback must be executed
using the transaction mechanism or not (see Transaction
control in MvComponent). If equal to true and
if no current transaction has been initialized, a new one is
implicitly created and commited.false if the request callback couldn't be sent,
true otherwise.RpObject.execDuplexCallback(java.lang.String, ilog.server.jcomp.MvValue[], java.lang.String, ilog.server.jcomp.MvValue[], int, boolean)
public boolean dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv,
int resultIndex)
dsExecDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, true)dsExecDuplexCallback(String, MvValue[], String, MvValue[], int,
boolean)
public boolean dsExecDuplexCallback(java.lang.String funName,
MvValue[] argv,
java.lang.String duplexFunName,
MvValue[] duplexArgv)
dsExecDuplexCallback(funName, argv, duplexFunName, duplexArgv, 0, true)dsExecDuplexCallback(String, MvValue[], String, MvValue[], int,
boolean)
public void dsDereference(java.lang.Object object,
java.lang.String propertyName,
IlsDataSourceContainer dsc,
boolean force)
protected boolean isDSObjectPropertyEditable(java.lang.Object obj,
java.lang.String propertyName)
obj - The representation object RpObject.propertyName - The property (attribute) name.true if the property (attribute) of the
representation object is editable.RpObject.isEditable(int)
protected boolean isDSObjectPropertyHRef(java.lang.Object obj,
java.lang.String propertyName)
obj - The representation object RpObject.propertyName - The property (attribute) name.true if the property of a representation object is
a hyper reference.RpObject.getAttributeType(int),
MvDataType
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||