Search in sources :

Example 1 with AutomaticListCWWorker

use of org.wikipediacleaner.gui.swing.bot.AutomaticListCWWorker in project wpcleaner by WPCleaner.

the class Bot method executeFixListCheckWiki.

/**
 * Execute an action of type FixListCheckWiki.
 *
 * @param actionConfig Parameters of the action.
 * @return True if the action was executed.
 */
private BasicWorker executeFixListCheckWiki(Action actionConfig) {
    Page page = null;
    if (actionConfig.actionArgs.length > 0) {
        page = DataManager.createSimplePage(wiki, actionConfig.actionArgs[0], null, null, null);
    }
    List<CheckErrorAlgorithm> algorithms = new ArrayList<>();
    List<CheckErrorAlgorithm> allAlgorithms = new ArrayList<>();
    if (actionConfig.actionArgs.length > 1) {
        extractAlgorithms(algorithms, allAlgorithms, actionConfig.actionArgs, 1);
    }
    AutomaticListCWWorker worker = new AutomaticListCWWorker(wiki, null, page, algorithms, allAlgorithms, namespaces, null, true, false);
    worker.setRange(rangeBegin, rangeEnd);
    return worker;
}
Also used : AutomaticListCWWorker(org.wikipediacleaner.gui.swing.bot.AutomaticListCWWorker) CheckErrorAlgorithm(org.wikipediacleaner.api.check.algorithm.CheckErrorAlgorithm) ArrayList(java.util.ArrayList) Page(org.wikipediacleaner.api.data.Page)

Aggregations

ArrayList (java.util.ArrayList)1 CheckErrorAlgorithm (org.wikipediacleaner.api.check.algorithm.CheckErrorAlgorithm)1 Page (org.wikipediacleaner.api.data.Page)1 AutomaticListCWWorker (org.wikipediacleaner.gui.swing.bot.AutomaticListCWWorker)1