public class IltDefaultDataSource extends IlpDefaultDataSource
IltObject
class
and its subclasses.Constructor and Description |
---|
IltDefaultDataSource()
Default constructor.
|
IltDefaultDataSource(IlpContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected List<IlpObject> |
addChildrenObjects(IlpObject ilpObject)
Adds also the objects that are children of the given object.
|
void |
addObject(IlpObject ilpObject)
Adds an object to the data source.
|
void |
attributeValueChange(AttributeValueEvent ev)
This method is called when an attribute value of an
IlpObject
in the data source is changed. |
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.
|
boolean |
isHandlingAlarmReferences()
Returns whether the data source handles or not references between
IltAlarm s and IltObject s. |
protected boolean |
isInShelf(IlpObject child)
Returns if the given object is an object contained in a
shelf or one of its children.
|
protected void |
removeObjectFromParent(IlpObject ilpObject)
Removes the given object from its current parent.
|
void |
setChildren(Object idOrIlpObject,
List childrenIdsOrIlpObjects)
Declares an object as having children.
|
void |
setHandlingAlarmReferences(boolean value)
Sets the data source behavior regarding references between
IltAlarm s and IltObject s. |
void |
setLink(Object idOrIlpObject,
Object fromIdOrIlpObject,
Object toIdOrIlpObject)
Declares an object as being a link.
|
void |
setParent(Object idOrIlpObject,
Object parentIdOrIlpObject)
Declares an object as being the child of another.
|
protected void |
subscribeToObject(IlpObject ilpObject)
Subscribe to receive events for the given object.
|
protected void |
unsubscribeToObject(IlpObject ilpObject)
Unsubscribe from notifications of the given business object.
|
addBean, addObjects, clear, getChildInterface, getChildren, getContainerInterface, getFileName, getFrom, getLinkExtremityInterface, getLinkInterface, getLinks, getObject, getObjects, getParent, getReferenceManager, getRootObjects, getTo, isSubscribedToObject, output, output, output, output, output, parse, parse, parse, parse, parse, parse, removeObject, removeObjects, removeObjects, setFileName, setFileName
addDataSourceListener, endBatch, fireBatchEnded, fireBatchStarted, fireObjectAdded, fireObjectAttributeChanged, fireObjectAttributeChanged, fireObjectRemoved, fireObjectsAdded, fireObjectsRemoved, fireObjectStructureChanged, getContext, getDebugMask, getIdentifier, logMessage, removeDataSourceListener, setContext, setDebugMask, startBatch, throwException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDataSourceListener, getContext, removeDataSourceListener
public IltDefaultDataSource()
IlpSystem.GetDefaultContext()
public IltDefaultDataSource(IlpContext context)
context
- The context used by the data source.public void attributeValueChange(AttributeValueEvent ev)
IlpObject
in the data source is changed.attributeValueChange
in interface AttributeValueListener
attributeValueChange
in class IlpDefaultDataSource
protected boolean isInShelf(IlpObject child)
child
- Business objecttrue
if the object is contained in a
shelf.public void setHandlingAlarmReferences(boolean value)
IltAlarm
s and IltObject
s.
By default the data source handles these references.
The result is that when IltAlarm
s are inserted in the
same data source as the IltObject
they references, then
alarm counters for the IltObject
are computed from
the corresponding list of alarms.
This property must be set before any object is added to the data source.
The association between IltAlarm
s and
IltObject
s is implemented by the
IltAlarm.ManagedObjectInstanceAttribute
attribute of IltAlarm
. To establish the association use the
object identifier of the IltObject
as the value for
ManagedObjectInstance
.
value
- true
to set the data source to handle
references between IltAlarm
s and
IltObject
s. false
to disable it.public boolean isHandlingAlarmReferences()
IltAlarm
s and IltObject
s.
By default the data source handles the references.
This property must be set before any object is added to the data source.
true
when the data source handles references
between IltAlarm
s and
IltObject
s. false
when it does not.public void addObject(IlpObject ilpObject)
If the object is an IltContainer
, its current children are
also added to the data source, and the children model is replicated
as a data source structure. This process is recursive, so that the children
of children are added too.
addObject
in interface IlpMutableDataSource
addObject
in class IlpDefaultDataSource
ilpObject
- The object to be added to the data source.protected List<IlpObject> addChildrenObjects(IlpObject ilpObject)
addChildrenObjects
in class IlpDefaultDataSource
ilpObject
- Business objectprotected void subscribeToObject(IlpObject ilpObject)
subscribeToObject
in class IlpDefaultDataSource
ilpObject
- Business object that has been added
to this datasource.protected void unsubscribeToObject(IlpObject ilpObject)
unsubscribeToObject
in class IlpDefaultDataSource
ilpObject
- Business objectprotected void removeObjectFromParent(IlpObject ilpObject)
removeObjectFromParent
in class IlpDefaultDataSource
ilpObject
- Business objectpublic void setLink(Object idOrIlpObject, Object fromIdOrIlpObject, Object toIdOrIlpObject)
IlpDefaultDataSource
As the parameters of this method can be either identifiers or
IlpObject
instances, the
IlpAbstractDataSource.getIdentifier(Object)
method can be used to retrieve the identifier in both cases.
setLink
in interface IlpMutableDataSource
setLink
in class IlpDefaultDataSource
idOrIlpObject
- The identifier of the link object or the object
itself.fromIdOrIlpObject
- The identifier of the "from" end of the link,
or the "from" object itself.toIdOrIlpObject
- The identifier of the "to" end of the link, or
the "to" object itself.public void setParent(Object idOrIlpObject, Object parentIdOrIlpObject)
IlpDefaultDataSource
As the parameters of this method can be either identifiers or
IlpObject
instances, the
IlpAbstractDataSource.getIdentifier(Object)
method can be used to retrieve the identifier in both cases.
setParent
in interface IlpMutableDataSource
setParent
in class IlpDefaultDataSource
idOrIlpObject
- The identifier of the child object, or the
child object itself.parentIdOrIlpObject
- The identifier of the parent object, or the
parent object itself.public void setChildren(Object idOrIlpObject, List childrenIdsOrIlpObjects)
setChildren
in interface IlpMutableDataSource
setChildren
in class IlpDefaultDataSource
idOrIlpObject
- The identifier of the object that has children or the object itself.childrenIdsOrIlpObjects
- A list containing the children
as identifiers or IlpObject
instances.public ilog.cpl.storage.internal.IlpSAXDataHandler createDataHandler(IlpMutableDataSource dataSource, XMLReader parser, IlpIdentifierFactory identifierFactory, IlpFilter pfilter, Object parentIdOfRootObjects, boolean buffering, Logger logger)
IlpAbstractDataSource
createDataHandler
in interface ilog.cpl.storage.internal.IlpSAXDataHandlerFactory
createDataHandler
in class IlpAbstractDataSource
dataSource
- Datasourceparser
- ParseidentifierFactory
- Identifier factorypfilter
- Filterbuffering
- Buffering events or notlogger
- Logger© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.