src/aria/core/IOFiltersMgr.js
function (oldFilter) {
                var filters = this._filters;
                // stop here if there are no filters
                if (!filters) {
                    return false;
                }
                var selectionCallback = getFindFilterFunction(oldFilter);
                if (selectionCallback == null) {
                    this.$logError(this.INVALID_PARAMETER_FOR_REMOVEFILTER);
                    clean();
                    return false;
                }
                var newFiltersArray = arrayUtils.filter(filters, selectionCallback, this);
                clean();
                var filterToRemove = findFilterRes;
                if (filterToRemove) {
                    if (filterToRemove.obj) {
                        // already loaded, dispose it
                        filterToRemove.obj.$dispose();
                        filterToRemove.obj = null;
                    } else {
                        // not yet loaded, prevent it to be loaded
                        this._filtersToBeLoaded--;
                    }
                    filterToRemove.filterClasspath = null;
                    filterToRemove.initArgs = null;
                    if (newFiltersArray.length === 0) {
                        this._filters = null;
                    } else {
                        this._filters = newFiltersArray;
                    }
                    return true;
                }
                return false;
            }
function (oldFilter) {
                var filters = this._filters;
                // stop here if there are no filters
                if (!filters) {
                    return false;
                }
                var selectionCallback = getFindFilterFunction(oldFilter);
                if (selectionCallback == null) {
                    this.$logError(this.INVALID_PARAMETER_FOR_REMOVEFILTER);
                    clean();
                    return false;
                }
                var newFiltersArray = arrayUtils.filter(filters, selectionCallback, this);
                clean();
                var filterToRemove = findFilterRes;
                if (filterToRemove) {
                    if (filterToRemove.obj) {
                        // already loaded, dispose it
                        filterToRemove.obj.$dispose();
                        filterToRemove.obj = null;
                    } else {
                        // not yet loaded, prevent it to be loaded
                        this._filtersToBeLoaded--;
                    }
                    filterToRemove.filterClasspath = null;
                    filterToRemove.initArgs = null;
                    if (newFiltersArray.length === 0) {
                        this._filters = null;
                    } else {
                        this._filters = newFiltersArray;
                    }
                    return true;
                }
                return false;
            }
function ( oldFilter ) { var filters = this . _filters ; // stop here if there are no filters if ( ! filters ) { return false ; } var selectionCallback = getFindFilterFunction ( oldFilter ) ; if ( selectionCallback == null ) { this . $logError ( this . INVALID_PARAMETER_FOR_REMOVEFILTER ) ; clean ( ) ; return false ; } var newFiltersArray = arrayUtils . filter ( filters , selectionCallback , this ) ; clean ( ) ; var filterToRemove = findFilterRes ; if ( filterToRemove ) { if ( filterToRemove . obj ) { // already loaded, dispose it filterToRemove . obj . $dispose ( ) ; filterToRemove . obj = null ; } else { // not yet loaded, prevent it to be loaded this . _filtersToBeLoaded -- ; } filterToRemove . filterClasspath = null ; filterToRemove . initArgs = null ; if ( newFiltersArray . length === 0 ) { this . _filters = null ; } else { this . _filters = newFiltersArray ; } return true ; } return false ; }
Remove a filter added with addFilter, and dispose it.
@param {MultiTypes} oldFilter It can be one of the following possibilities:
<ul>
<li>An instance of a filter class.</li>
<li>An object containing two properties: classpath and initArgs.</li>
<li>The classpath of a filter class.</li>
</ul>
@return {Boolean} return true if a filter was removed, false if no filter matching the conditions was
found.
Remove a filter added with addFilter and dispose it .