|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.datasource.IlpAbstractDataSource
public abstract class IlpAbstractDataSource
Abstract implementation of data source that provides notification support.
| Constructor Summary | |
|---|---|
IlpAbstractDataSource()
Default constructor. |
|
IlpAbstractDataSource(IlpContext context)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDataSourceListener(DataSourceListener l)
Adds a listener to the data source. |
ilog.cpl.storage.internal.IlpSAXDataHandler |
createDataHandler(IlpMutableDataSource dataSource,
XMLReader parser,
IlpIdentifierFactory identifierFactory,
IlpFilter pfilter,
Object parentIdOfRootObjects,
boolean buffering,
Logger logger)
Creates a new datasource data handler. |
void |
endBatch()
Terminates a batch of modifications. |
void |
fireBatchEnded()
Fires an batch ended event. |
void |
fireBatchStarted()
Fires an batch started event. |
void |
fireObjectAdded(IlpObject object)
Fires an object added event for one object. |
void |
fireObjectAttributeChanged(IlpObject object,
IlpAttribute attribute)
Fires an object attribute changed event. |
void |
fireObjectAttributeChanged(IlpObject object,
IlpAttribute attribute,
Object newValue,
Object oldValue)
Fires an object attribute changed event. |
void |
fireObjectRemoved(IlpObject object)
Fires an object removed event for one object. |
void |
fireObjectsAdded(List objects)
Fires an object added event for a list of objects. |
void |
fireObjectsRemoved(List objects)
Fires an object removed event for a list of objects. |
void |
fireObjectStructureChanged(IlpObject object,
Class structuralInterface)
Fires an object structure changed event. |
IlpContext |
getContext()
Returns the context used by this data source. |
int |
getDebugMask()
Returns the debug mask configured for this datasource. |
protected Object |
getIdentifier(Object idOrIlpObject)
Utility method that retrieves an object identifier from a parameter that can be either an identifier or an IlpObject instance. |
protected boolean |
logMessage(Logger logger,
Level l)
Indicates if a message shall be logged in the given logger. |
void |
removeDataSourceListener(DataSourceListener l)
Removes a listener of the data source. |
void |
setContext(IlpContext context)
Set the context used by this data source. |
void |
setDebugMask(int mask)
Sets a new debug mask in this datasource. |
void |
startBatch()
Starts a batch of modifications. |
protected boolean |
throwException()
Indicates if an exception shall be thrown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ilog.cpl.datasource.IlpDataSource |
|---|
getChildInterface, getContainerInterface, getLinkExtremityInterface, getLinkInterface, getObject, getObjects |
| Constructor Detail |
|---|
public IlpAbstractDataSource()
IlpSystem.GetDefaultContext()public IlpAbstractDataSource(IlpContext context)
context - The context used by the data source.| Method Detail |
|---|
public IlpContext getContext()
getContext in interface IlpDataSourcepublic void setContext(IlpContext context)
public void startBatch()
batchStarted
event.
Use this method if you plan to make changes to the content of a data source such as:
endBatch.
startBatch in interface IlvBatchableendBatch()public void endBatch()
batchEnded event.
endBatch in interface IlvBatchablestartBatch()public void addDataSourceListener(DataSourceListener l)
addDataSourceListener in interface IlpDataSourcel - The listener to add.public void removeDataSourceListener(DataSourceListener l)
removeDataSourceListener in interface IlpDataSourcel - The listener to remove.public void fireObjectAdded(IlpObject object)
object - The object that has been added. Cannot be null.public void fireObjectsAdded(List objects)
objects - The objects that have been added. Cannot be null.public void fireObjectRemoved(IlpObject object)
object - The object that has been removed. Cannot be null.public void fireObjectsRemoved(List objects)
objects - The objects that have been removed. Cannot be null).public void fireBatchStarted()
public void fireBatchEnded()
public void fireObjectStructureChanged(IlpObject object,
Class structuralInterface)
object - The object whose structure has changed. Cannot be null.structuralInterface - The structural interface that has changed. Cannot be null.
public void fireObjectAttributeChanged(IlpObject object,
IlpAttribute attribute)
fireObjectAttributeChanged(IlpObject, IlpAttribute, Object, Object) instead.
object - The object whose attribute has changed. Cannot be
null.attribute - The attribute that has changed. Cannot be
null.
public void fireObjectAttributeChanged(IlpObject object,
IlpAttribute attribute,
Object newValue,
Object oldValue)
object - The object whose attribute has changed. Cannot be
null.attribute - The attribute that has changed. Cannot be
null.newValue - The new value of the attribute.oldValue - The previous value of the attribute. When the old value
is not available, use
DataSourceObjectEvent.OLD_VALUE_UNAVAILABLE.protected Object getIdentifier(Object idOrIlpObject)
IlpObject instance.
idOrIlpObject - May be an IlpObject instance
or an identifier (of any other Java class).
IlpObject instance, or
the identifier of the parameter if it is an IlpObject instance.
public ilog.cpl.storage.internal.IlpSAXDataHandler createDataHandler(IlpMutableDataSource dataSource,
XMLReader parser,
IlpIdentifierFactory identifierFactory,
IlpFilter pfilter,
Object parentIdOfRootObjects,
boolean buffering,
Logger logger)
createDataHandler in interface ilog.cpl.storage.internal.IlpSAXDataHandlerFactorydataSource - Datasourceparser - ParseidentifierFactory - Identifier factorypfilter - FilterparentIdOfRootObjects - buffering - Buffering events or notlogger - Logger
public void setDebugMask(int mask)
The debug mask can be used by the datasource implementations to tell how the implementation should behave in case of errors. It is up to the datasource implementation to choose if the debug mask will be respected and when to use it to log a message and/or throw an exception.
mask - Debug maskIlpDataSourceDebugMaskpublic int getDebugMask()
IlpDataSourceDebugMask
protected boolean logMessage(Logger logger,
Level l)
logger - Loggerl - Log level
true if this datasource is configured to
log messages when performing operations that change the
data source contents.protected boolean throwException()
true if this datasource is configured to
throw exceptions when performing operations that change
the data source contents.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||