@Test public void testReadEntries() throws Exception { prepareReadEntries(); List<Object> result = registryHelper.readEntries(rootPath, filter); assertEquals(expectedObjects, result); for (Path path : entryPaths) { verify(registryHelper, times(1)).readEntry(path); } }
public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was produced while processing entry for path: " + path, e); throw e; } } return entries; }
VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was produced while processing entry for path: " + path, e); throw e; } } return entries; } }
VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was produced while processing entry for path: " + path, e); throw e; } } return entries; } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); }
VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was produced while processing entry for path: " + path, e); throw e; } } return entries; } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); Path ensureDirectory(final String directory); String md5Hex(String content); void storeEntry(final Path path,
                           final Object value); Object readEntry(final Path path); List<Object> readEntries(final Path rootPath,
                                    final DirectoryStream.Filter<Path> filter); void writeBatch(final Path path,
                           final String content); void deleteBatch(final Path path); }
VFSRegistryHelper { public List<Object> readEntries(final Path rootPath, final DirectoryStream.Filter<Path> filter) throws Exception { final List<Object> entries = new ArrayList<>(); for (Path path : ioService.newDirectoryStream(rootPath, filter)) { try { entries.add(readEntry(path)); } catch (Exception e) { logger.error("An error was produced while processing entry for path: " + path, e); throw e; } } return entries; } VFSRegistryHelper(); @Inject  VFSRegistryHelper(final VFSMarshallerRegistry marshallerRegistry,
                             final @Named("ioStrategy") IOService ioService,
                             final @Named("systemFS") FileSystem fileSystem); Path ensureDirectory(final String directory); String md5Hex(String content); void storeEntry(final Path path,
                           final Object value); Object readEntry(final Path path); List<Object> readEntries(final Path rootPath,
                                    final DirectoryStream.Filter<Path> filter); void writeBatch(final Path path,
                           final String content); void deleteBatch(final Path path);  }