/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\supportClasses\DataProviderNotifierBase.as
 * org.apache.royale.html.supportClasses.DataProviderNotifierBase
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.supportClasses.DataProviderNotifierBase');

goog.require('org.apache.royale.collections.ArrayList');
goog.require('org.apache.royale.core.IBeadModel');
goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.IEventDispatcher');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.core.IDataProviderNotifier');
goog.require('org.apache.royale.core.IDocument');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 * @implements {org.apache.royale.core.IDocument}
 * @implements {org.apache.royale.core.IDataProviderNotifier}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase = function() {
};


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.supportClasses.DataProviderNotifierBase', org.apache.royale.html.supportClasses.DataProviderNotifierBase);


/**
 * @protected
 * @type {org.apache.royale.collections.ArrayList}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.dataProvider;


/**
 * @protected
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype._strand;


/**
 * @protected
 * @param {org.apache.royale.events.Event} event
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.destinationChangedHandler = function(event) {
};


/**
 * @protected
 * @type {Object}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.document;


/**
 * @asprivate
 * @export
 * @param {Object} document
 * @param {string=} id
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.setDocument = function(document, id) {
  id = typeof id !== 'undefined' ? id : null;
  this.document = document;
};


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.org_apache_royale_html_supportClasses_DataProviderNotifierBase__destinationPropertyName;


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.org_apache_royale_html_supportClasses_DataProviderNotifierBase__changeEventName;


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.org_apache_royale_html_supportClasses_DataProviderNotifierBase__sourceID;


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.org_apache_royale_html_supportClasses_DataProviderNotifierBase__propertyName;


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__strand = function(value) {
  this._strand = value;
  if (this._strand[this.destinationPropertyName] == null) {
    var /** @type {org.apache.royale.core.IBeadModel} */ model = org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(this._strand, org.apache.royale.core.UIBase, true).model, org.apache.royale.core.IBeadModel);
    org.apache.royale.utils.Language.as(model, org.apache.royale.events.IEventDispatcher, true).addEventListener(this.changeEventName, org.apache.royale.utils.Language.closure(this.destinationChangedHandler, this, 'destinationChangedHandler'));
  } else {
    this.destinationChangedHandler(null);
  }
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__destinationPropertyName = function() {
  return this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__destinationPropertyName;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__destinationPropertyName = function(value) {
  this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__destinationPropertyName = value;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__changeEventName = function() {
  return this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__changeEventName;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__changeEventName = function(value) {
  this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__changeEventName = value;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__sourceID = function() {
  return this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__sourceID;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__sourceID = function(value) {
  this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__sourceID = value;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__propertyName = function() {
  return this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__propertyName;
};


org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__propertyName = function(value) {
  this.org_apache_royale_html_supportClasses_DataProviderNotifierBase__propertyName = value;
};


Object.defineProperties(org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype, /** @lends {org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__strand},
/**
  * @export
  * @type {string} */
destinationPropertyName: {
get: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__destinationPropertyName,
set: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__destinationPropertyName},
/**
  * @export
  * @type {string} */
changeEventName: {
get: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__changeEventName,
set: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__changeEventName},
/**
  * @export
  * @type {string} */
sourceID: {
get: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__sourceID,
set: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__sourceID},
/**
  * @export
  * @type {string} */
propertyName: {
get: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.get__propertyName,
set: org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.set__propertyName}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'DataProviderNotifierBase', qName: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase', kind: 'class' }], interfaces: [org.apache.royale.core.IBead, org.apache.royale.core.IDocument, org.apache.royale.core.IDataProviderNotifier] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.supportClasses.DataProviderNotifierBase.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'},
        'destinationPropertyName': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'},
        'changeEventName': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'},
        'sourceID': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'},
        'propertyName': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'}
      };
    },
    methods: function () {
      return {
        'DataProviderNotifierBase': { type: '', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase'},
        'setDocument': { type: 'void', declaredBy: 'org.apache.royale.html.supportClasses.DataProviderNotifierBase', parameters: function () { return [  { index: 1, type: 'Object', optional: false },{ index: 2, type: 'String', optional: true } ]; }}
      };
    }
  };
};