1 package org.cyclopsgroup.gitcon; 2 3 import java.io.File; 4 5 /** 6 * A source that gets files from a logical repository into physical local file 7 * system 8 */ 9 public interface Source 10 { 11 /** 12 * Get files from logical source into local working directory when 13 * application starts 14 * 15 * @param workingDirectory Local working directory, the root of local 16 * repository 17 * @return The root of copied files from logical source under working 18 * directory. It's not necessarily the same working directory, since 19 * the implementation of {@link Source} may choose to download 20 * remote files into a subdirectory under working directory, in 21 * which case the subdirectory is returned. 22 * @throws Exception Allows any exception 23 */ 24 File initWorkingDirectory( File workingDirectory ) 25 throws Exception; 26 27 /** 28 * Get modified files from logic source into local working directory. This 29 * call gets remote incremental modifications and is expected to be called 30 * repeatedly. 31 * 32 * @param workingDirectory Local working directory 33 * @throws Exception Allows any exception 34 */ 35 void updateWorkingDirectory( File workingDirectory ) 36 throws Exception; 37 }