Packageat.datacollection.workers
Classpublic class DataWorkerGeneric
ImplementsIDataItemWorker
SubclassesDataWorkerCall, DataWorkerForm, DataWorkerOverlay, DataWorkerPrecall, DataWorkerSlide, DataWorkerVideo



Public Properties
 PropertyDefined by
  debugMode : Boolean = false
[static] Enables / Disables output for this class
DataWorkerGeneric
  expectedItemType : String
[read-only] This is the IDataItemWorker implementation of the expected type of the worker class.
DataWorkerGeneric
  type : String
[read-only] This is the IDataItemWorker implementation of this worker classes type.
DataWorkerGeneric
Protected Properties
 PropertyDefined by
  _itemList : Array
An internal list of Data items for this worker class.
DataWorkerGeneric
Public Methods
 MethodDefined by
  
Constructor.
DataWorkerGeneric
  
This is the IDataItemWorker implementation of adding a Data item to this classes internal list.
DataWorkerGeneric
  
flush():void
This is the IDataItemWorker implementation of flushing open bookends to the database.
DataWorkerGeneric
Protected Methods
 MethodDefined by
  
attachListeners(index:int):void
Attaches listeners that begin and end data events.
DataWorkerGeneric
  
Function goes through the hierarchy of the object passed and return the first instance of a presentation module in the chain.
DataWorkerGeneric
  
findTarget(pTarget:*):int
Finds a matching target in the _itemList and returns its position in the array.
DataWorkerGeneric
  
onEndEvent(e:Event = null):void
This is the event handler that handles the book end data population.
DataWorkerGeneric
  
onStartEvent(e:Event):void
This is the event handler that handles the book start data population.
DataWorkerGeneric
  
parseOptions(index:int):void
This method iterates over the DataWorker Options that were specified in the in the Data Item Description and modifies the data before it is pushed into the database.
DataWorkerGeneric
  
pushToDatabase(index:int):void
This method pushes the BookStart, BookEnd and related slot data to the DataCollectionInterface to be inserted into the DataCollection database.
DataWorkerGeneric
  
removeListeners(index:int):void
Removes the listeners that were attached from the attachListeners(index:int) method.
DataWorkerGeneric
Public Constants
 ConstantDefined by
  DATA_EXPECTED_TYPE : String = "generic"
[static] This is the constant variable used by DataWorkerGeneric implementation of expectedItemType() as well as the constant used by its related Data Item class (DataItemGeneric) itemType() implementation.
DataWorkerGeneric
  DATA_TYPE : String = "dataCollectionGeneric"
[static] This is the constant variable that determines the type of data worker that this class represents.
DataWorkerGeneric
Property detail
debugModeproperty
public static var debugMode:Boolean = false

Enables / Disables output for this class

expectedItemTypeproperty 
expectedItemType:String  [read-only]

This is the IDataItemWorker implementation of the expected type of the worker class. The matching Data Item Description will have the same value in its itemType() property.

Implementation
    public function get expectedItemType():String

See also

at.datacollection.workers.DataWorkerGeneric.DATA_EXPECTED_TYPE
_itemListproperty 
protected var _itemList:Array

An internal list of Data items for this worker class. Items are added via the addDataItem(...) method

typeproperty 
type:String  [read-only]

This is the IDataItemWorker implementation of this worker classes type. This simply adds an identifer to this worker class.

Implementation
    public function get type():String

See also

at.datacollection.workers.DataWorkerGeneric.DATA_TYPE
Constructor detail
DataWorkerGeneric()constructor
public function DataWorkerGeneric()

Constructor.

Method detail
addDataItem()method
public function addDataItem(value:IDataItemDescription):void

This is the IDataItemWorker implementation of adding a Data item to this classes internal list. Once added to the internal list it calls the attachListeners(index) method.

Parameters
value:IDataItemDescription
attachListeners()method 
protected function attachListeners(index:int):void

Attaches listeners that begin and end data events. DataCollection events are determined by the Data item description. This method is automatically called by addDataItem(...)

Parameters
index:int — Index of the object in the internal itemList that you wish to attach listeners to.
findPresentation()method 
protected function findPresentation(pTarget:*):IPresentationModule

Function goes through the hierarchy of the object passed and return the first instance of a presentation module in the chain.

Parameters
pTarget:*

Returns
IPresentationModule
findTarget()method 
protected function findTarget(pTarget:*):int

Finds a matching target in the _itemList and returns its position in the array.

Parameters
pTarget:*

Returns
int
flush()method 
public function flush():void

This is the IDataItemWorker implementation of flushing open bookends to the database.

onEndEvent()method 
protected function onEndEvent(e:Event = null):void

This is the event handler that handles the book end data population. Every worker class has a slightly different implementation of this function to handle its specific needs. This function also parses the data options as specified in the Data Item Description and pushes the information to the database.

Parameters
e:Event (default = null)
onStartEvent()method 
protected function onStartEvent(e:Event):void

This is the event handler that handles the book start data population. Every worker class has a slightly different implementation of this function to handle its specific needs.

Parameters
e:Event
parseOptions()method 
protected function parseOptions(index:int):void

This method iterates over the DataWorker Options that were specified in the in the Data Item Description and modifies the data before it is pushed into the database.

Parameters
index:int — Index of the object in the internal itemList

See also

pushToDatabase()method 
protected function pushToDatabase(index:int):void

This method pushes the BookStart, BookEnd and related slot data to the DataCollectionInterface to be inserted into the DataCollection database.

Parameters
index:int — Index of the object in the internal itemList
removeListeners()method 
protected function removeListeners(index:int):void

Removes the listeners that were attached from the attachListeners(index:int) method.

Parameters
index:int — Index of the object in the internal itemList that you wish to remove listeners from.
Constant detail
DATA_EXPECTED_TYPEconstant
public static const DATA_EXPECTED_TYPE:String = "generic"

This is the constant variable used by DataWorkerGeneric implementation of expectedItemType() as well as the constant used by its related Data Item class (DataItemGeneric) itemType() implementation. This variable is used to maintain the relationship between Item and Worker. The DataCollection module utilizes this relation in its addDataItem method to pair the item with its corresponding worker class.

DATA_TYPEconstant 
public static const DATA_TYPE:String = "dataCollectionGeneric"

This is the constant variable that determines the type of data worker that this class represents. When extending this class create a public static const DATA_TYPE:String and supply that string with a unique identifer for the worker. This value is used in the implemented getter type() as dictated by the IDataItemWorker.

See also

at.datacollection.workers.DataWorkerGeneric.type()
at.datacollection.workers.IDataItemWorker