1 package ch.busyboxes.agoo.dao; 2 3 import java.util.List; 4 5 import ch.busyboxes.agoo.model.WatchedFile; 6 import ch.busyboxes.agoo.model.WatchedFolder; 7 8 /** 9 * Interface for accessing watched folders 10 * 11 * @author julien@busyboxes.ch 12 */ 13 public interface WatchedFolderDAO { 14 15 /** 16 * Returns the list of all watched folders 17 * 18 * @return a list of watched folders 19 */ 20 public List<WatchedFolder> getAllWatchedFolders(); 21 22 /** 23 * Saves the given WatchedFolder 24 * 25 * @param watchedFolder the watched folder to be saved 26 */ 27 public void saveWatchedFolder(WatchedFolder watchedFolder); 28 29 /** 30 * Gets a watched folder by ID 31 * 32 * @param folderId the watched folder ID 33 * @return the watched folder 34 */ 35 public WatchedFolder getWatchedFolderById(Long folderId); 36 37 /** 38 * Add the given path to the given watched folder 39 * 40 * @param watchedFolder the watched folder 41 * @param filePath the path to the watched file 42 */ 43 public void addWatchedFileToFolder(WatchedFolder watchedFolder, 44 String filePath); 45 46 /** 47 * Add the given paths to the given watched folder 48 * 49 * @param watchedFolder the watched folder 50 * @param filePaths the paths to the watched file 51 * @return new watched files created 52 */ 53 public List<WatchedFile> addWatchedFilesToFolder(WatchedFolder watchedFolder, 54 List<String> filePaths); 55 56 /** 57 * Delete the watched folder based on its id 58 * 59 * @param folderId the watched folder ID 60 */ 61 public void deleteWatchedFolder(Long folderId); 62 63 }