@Test public void testSaveOneFile() throws Exception { final EntryNamesVerifyingStorage storage = new EntryNamesVerifyingStorage(); final ConfigurationFileManager subject = getTestJenkinsConfiguration(storage); tempDir.newFile("example.txt"); subject.saveConfiguration("*.txt", ""); assertEquals(Collections.singletonList("example.txt"), storage.names); }
public void saveConfiguration(final String includes, final String excludes) { final InputStreamFromOutputStream<Object> input = new InputStreamFromOutputStream<Object>() { @Override protected Object produce(final OutputStream output) throws Exception { final DirScanner scanner = new DirScanner.Glob(includes, excludes); rootDirectory.zip(output, scanner); return null; } }; configurationProvider.getStorage().save(input); }
ConfigurationFileManager { public void saveConfiguration(final String includes, final String excludes) { final InputStreamFromOutputStream<Object> input = new InputStreamFromOutputStream<Object>() { @Override protected Object produce(final OutputStream output) throws Exception { final DirScanner scanner = new DirScanner.Glob(includes, excludes); rootDirectory.zip(output, scanner); return null; } }; configurationProvider.getStorage().save(input); } }
ConfigurationFileManager { public void saveConfiguration(final String includes, final String excludes) { final InputStreamFromOutputStream<Object> input = new InputStreamFromOutputStream<Object>() { @Override protected Object produce(final OutputStream output) throws Exception { final DirScanner scanner = new DirScanner.Glob(includes, excludes); rootDirectory.zip(output, scanner); return null; } }; configurationProvider.getStorage().save(input); } ConfigurationFileManager();   ConfigurationFileManager(final ConfigurationProvider configurationProvider, final File rootDirectory); }
ConfigurationFileManager { public void saveConfiguration(final String includes, final String excludes) { final InputStreamFromOutputStream<Object> input = new InputStreamFromOutputStream<Object>() { @Override protected Object produce(final OutputStream output) throws Exception { final DirScanner scanner = new DirScanner.Glob(includes, excludes); rootDirectory.zip(output, scanner); return null; } }; configurationProvider.getStorage().save(input); } ConfigurationFileManager();   ConfigurationFileManager(final ConfigurationProvider configurationProvider, final File rootDirectory); void initConfiguration(); void restoreConfiguration(); void unzipFilesFrom(final FileItem file); void deleteFile(final String path); void saveConfiguration(final String includes, final String excludes); InputStream downloadStoredConfiguration(); File getRootDirectory(); }
ConfigurationFileManager { public void saveConfiguration(final String includes, final String excludes) { final InputStreamFromOutputStream<Object> input = new InputStreamFromOutputStream<Object>() { @Override protected Object produce(final OutputStream output) throws Exception { final DirScanner scanner = new DirScanner.Glob(includes, excludes); rootDirectory.zip(output, scanner); return null; } }; configurationProvider.getStorage().save(input); } ConfigurationFileManager();   ConfigurationFileManager(final ConfigurationProvider configurationProvider, final File rootDirectory); void initConfiguration(); void restoreConfiguration(); void unzipFilesFrom(final FileItem file); void deleteFile(final String path); void saveConfiguration(final String includes, final String excludes); InputStream downloadStoredConfiguration(); File getRootDirectory();  }