private void search(File folder) {
        if (folder == null || !folder.isDirectory()) {
            return;
        }

        File[] objects;
        if (filter != null) {
            objects = folder.listFiles(filter);
        } else {
            objects = folder.listFiles();
        }

        if (objects == null || objects.length == 0) {
            return;
        }

        for (File f : objects) {
            if (f.canRead()) {
                if (f.isFile()) {
                    controller.addFile(f);
                    logger.log(Level.FINER, "{0} - file ({1})", new Object[]{Thread.currentThread().getName(), f.getAbsolutePath()});
                } else if (f.isDirectory()) {
                    controller.addFolder(f);
                    logger.log(Level.FINER, "{0} - folder ({1})", new Object[]{Thread.currentThread().getName(), f.getAbsolutePath()});
                }
            }
        }
    }