/*
fire*CaseDataAdded
962205
public void fireBeforeCaseDataAdded(String caseId, CaseFileInstance caseFile, String definitionId, Map<String, Object> data) {
        final Iterator<CaseEventListener> iter = getEventListenersIterator();

        if (iter.hasNext()) {
            final CaseDataEvent event = new CaseDataEvent(identityProvider.getName(), caseId, caseFile, definitionId, data);

            do {
                iter.next().beforeCaseDataAdded(event);
            } while (iter.hasNext());
        }        
    }
979608
protected void fireChange(Date newValue, boolean isTyping) {

        ValueChangeEvent.<Date> fireIfNotEqual(this, m_oldValue, CalendarUtil.copyDate(newValue));
        CmsDateBoxEvent.fire(this, newValue, isTyping);
        m_oldValue = newValue;
    }
881379
function(rowIndex, selected, fire) {
        var self = this;
        if (rowIndex === 0) {
            rowIndex = $.map(this.options.data, function(val, index) {
                return index + 1;
            });
        }
        if (!$.isArray(rowIndex)) {
            rowIndex = [rowIndex];
        }

        $.each(rowIndex, function(index, val) {
            var tr = self.$tableBody.find('tbody tr:nth-child(' + (self.rowSpan > 1 ? (val * self.rowSpan) : val) + ')')
                .filter('[class!="sum"]')
                .filter('[class!="select-disabled"]'),
                checkbox = tr.find('.select-col :checkbox');
            if (selected) {
                checkbox.bizCheckbox('check');
                tr.addClass('selected');
            } else {
                checkbox.bizCheckbox('uncheck');
                tr.removeClass('selected');
            }
        });

        var selectedCount = self.$tableBody.find('.select-col .biz-checkbox-checked').length,
            checkboxCount = self.$tableBody.find('.select-col :checkbox').filter(':not(:disabled)').length,
            selectAll = self.$tableHead.find('.select-col :checkbox');
        if (selectedCount === checkboxCount) {
            selectAll.bizCheckbox('check');
        } else {
            selectAll.bizCheckbox('uncheck');
        }

        if (fire && this.options.onSelect) {
            this.options.onSelect.call(this, this.getSelected());
        }
    }
1045786
public static <S extends HasAttachHandlers> void fire(S source, RowSelChangedData data) {
        if (TYPE != null) {
            JQMDataTableRowSelChangedEvent event = new JQMDataTableRowSelChangedEvent(data);
            source.fireEvent(event);
        }
    }
1030679
public void fireBeforeCaseClosed(String caseId, CaseFileInstance caseFile, String comment) {
        final Iterator<CaseEventListener> iter = getEventListenersIterator();

        if (iter.hasNext()) {
            final CaseCloseEvent event = new CaseCloseEvent(identityProvider.getName(), caseId, caseFile, comment);

            do{
                iter.next().beforeCaseClosed(event);
            } while (iter.hasNext());
        }
    }
703787
void changedValue(Object value) {
		Object oldValue = super.putSilent(VALUE, value);
		if (!Objects.equals(oldValue, value)) {
			fireChange();
		}
	}
888953
protected synchronized void fireAttributeAddedEvent(String name, AttributeValue attr) {
		if (this.listenerList != null && isEventFirable()) {
			final AttributeChangeListener[] list = new AttributeChangeListener[this.listenerList.size()];
			this.listenerList.toArray(list);
			final AttributeChangeEvent event = new AttributeChangeEvent(
					this,
					Type.ADDITION,
					null,
					null,
					name,
					attr);
			for (final AttributeChangeListener listener : list) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
181623
function __fireAttrChange(self, when, name, prevVal, newVal, subAttrName, attrName, data) {
        attrName = attrName || name;
        return self.fire(whenAttrChangeEventName(when, name), util.mix({
            attrName: attrName,
            subAttrName: subAttrName,
            prevVal: prevVal,
            newVal: newVal
        }, data));
    }
735753
function(data, event) {
        var extraArgs = _.toArray(arguments).slice(2),
        leaveState = this.currentState,
        enterState = data.enterState,
        triggers = data.triggers

        if (!this.silent)
          this.trigger.apply(this, ['leaveState:' + leaveState].concat(extraArgs))
        this._callCallbacks(this._states[leaveState].leave, extraArgs)

        if (!this.silent) {
          this.trigger.apply(this, ['transition', leaveState, enterState].concat(extraArgs))
          if (triggers)
            this.trigger.apply(this, [triggers].concat(extraArgs))
        }

        this._callCallbacks(data.callbacks, extraArgs)
        if (!this.silent)
          this.trigger.apply(this, ['enterState:' + enterState].concat(extraArgs))

        this.toState.apply(this, [enterState].concat(extraArgs))
      }
601638
private void fireUpdated(Object source) {
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).valueUpdated(this);
		}
	}
1149140
@Override
  public void fireValueNodeRemoved(IValueNode valueNode) {
    for (IDatabaseListener iDatabaseListener : listeners) {
      iDatabaseListener.valueNodeRemoved(valueNode);
    }
  }
821194
protected void updateCaseFileItems(AuditCaseInstanceData auditCaseInstanceData, EntityManager em) {
        
        if (auditCaseInstanceData.getCaseFileData() == null || auditCaseInstanceData.getCaseFileData().isEmpty()) {
            return;
        }

        List<String> currentCaseData = currentCaseData(auditCaseInstanceData.getCaseId(), em);
        auditCaseInstanceData.getCaseFileData().forEach((item) -> {
                        
            CaseFileDataLog caseFileDataLog = null;
            if (currentCaseData.contains(item.getItemName())) {
                logger.debug("Case instance {} has already stored log value for {} thus it's going to be updated", auditCaseInstanceData.getCaseId(), item.getItemName());
                caseFileDataLog = caseFileDataByName(auditCaseInstanceData.getCaseId(), item.getItemName(), em);
            
                caseFileDataLog.setItemType(item.getItemType());
                caseFileDataLog.setItemValue(item.getItemValue());
                caseFileDataLog.setLastModified(item.getLastModified());
                caseFileDataLog.setLastModifiedBy(item.getLastModifiedBy());
                em.merge(caseFileDataLog);
            } else {
                logger.debug("Case instance {} has no log value for {} thus it's going to be inserted", auditCaseInstanceData.getCaseId(), item.getItemName());                
                em.persist(item);
            }   
            
        }
1335928
void handleAdd() {
        BoofSwingUtil.checkGuiThread();
        java.util.List<File> paths = browser.getSelectedFiles();

        for (int i = 0; i < paths.size(); i++) {
            File f = paths.get(i);

            // if it's a directory add all the files in the directory
            if( f.isDirectory() ) {
                java.util.List<String> files = UtilIO.listAll(f.getPath());
                Collections.sort(files);
                for (int j = 0; j < files.size(); j++) {
                    File p = new File(files.get(j));
                    // Note: Can't use mimetype to determine if it's an image or not since it isn't 100% reliable
                    if( p.isFile() ) {
                        selected.addPath(p);
                    }
                }
            } else {
                selected.addPath(f);
            }
        }
    }
833473
protected synchronized void fireAttributeRenamedEvent(String oldName, String newName, AttributeValue attr) {
		if (this.listenerList != null && isEventFirable()) {
			final AttributeChangeListener[] list = new AttributeChangeListener[this.listenerList.size()];
			this.listenerList.toArray(list);
			final AttributeChangeEvent event = new AttributeChangeEvent(
					this,
					Type.RENAME,
					oldName,
					attr,
					newName,
					attr);
			for (final AttributeChangeListener listener : list) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
915791
function buildViewAttribsFire( def, code ) {
    code.pm = true;
    const attribs = def[ "view.attribs" ];
    if ( typeof attribs !== 'object' ) return;
    try {
        for ( const attName of Object.keys( attribs ) ) {
            const camelCaseAttName = camelCase( attName );
            if ( !code.isAction( attName ) ) {
                buildViewAttribsInitFire( camelCaseAttName, code );
            }
        }
    } catch ( ex ) {
        bubble( ex, `...in buildViewAttribsFire - view.attribs: ${JSON.stringify(attribs, null, "  ")}` );
    }
}
1318172
function handleData(state, data) {
    debug('Read data from ', streamName(this));

    try {
      addData.call(state, data);
    } catch (err) {
      debug(`Error adding data from ${streamName(this)}`, err);
      reject(err);
      done();
      return;
    }

    if (options.incremental) {
      doCompare(options.incremental, CompareType.incremental);
    }
  }
1088464
function onEvent(e) {
    const eventData = e.detail;

    if (ignoreFiredEvents === true) {
      return;
    }

    fireEvent(e.currentTarget, eventData);
  }