com.sdm.quasar.client.core.data.plugin
Class AbstractDataManagerPlugIn

java.lang.Object
  extended bycom.sdm.quasar.client.core.data.plugin.AbstractDataManagerPlugIn
All Implemented Interfaces:
DataManagerPlugIn, Disposable
Direct Known Subclasses:
DefaultBasicValuesPlugIn, DefaultCUFValueModelPlugIn, DefaultIndexedValuesPlugIn, DefaultValueChangedPlugIn

public abstract class AbstractDataManagerPlugIn
extends java.lang.Object
implements DataManagerPlugIn


Constructor Summary
AbstractDataManagerPlugIn()
          Creates a new AbstractDataManagerPlugIn.
 
Method Summary
 void dispose()
          Disposes the component.
protected  DataCore getDataCore()
          Returns the DataCore installed to.
 void install(DataCore dataCore)
          Called by the data core when the plug in is installed in the data core
protected abstract  void notifyNodeAdded(NodeController node)
          Called by the DataCore when a node has been added.
protected abstract  void notifyNodeWillBeRemoved(NodeController node)
          Called by the DataCore before a node will be removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataManagerPlugIn

public AbstractDataManagerPlugIn()
Creates a new AbstractDataManagerPlugIn.

Method Detail

install

public void install(DataCore dataCore)
Description copied from interface: DataManagerPlugIn
Called by the data core when the plug in is installed in the data core

Specified by:
install in interface DataManagerPlugIn
Parameters:
dataCore - the DataCore this plugin interacts with.
See Also:
DataManagerPlugIn.install(com.sdm.quasar.client.core.data.plugin.DataCore)

dispose

public void dispose()
             throws DisposeException
Description copied from interface: Disposable
Disposes the component.

Important:
This method is called by an administrating component and must never be called directly.

The implementation should release any resources or objects allocated and any services registered. Furthermore, this method should be developed carefully to free a maximum of resources even when the system may have become unstable. In case of one or multiple errors, you should collect them in a DisposeException, continue with the execution, and throw it at the end of the method.

Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.

Specified by:
dispose in interface Disposable
Throws:
DisposeException - if there was one or more errors while disposing the component.
See Also:
Disposable.dispose()

getDataCore

protected DataCore getDataCore()
Returns the DataCore installed to.

Throws:
java.lang.IllegalStateException - if called before install(DataCore) was called or after dispose.

notifyNodeAdded

protected abstract void notifyNodeAdded(NodeController node)
Called by the DataCore when a node has been added. The implementation may register value handlers for the new node.

Parameters:
node - the node that has been added

notifyNodeWillBeRemoved

protected abstract void notifyNodeWillBeRemoved(NodeController node)
Called by the DataCore before a node will be removed.

Parameters:
node - the key of the node that will be removed.