1 package ch.busyboxes.agoo.service;
2
3 import java.util.List;
4
5 import ch.busyboxes.agoo.controller.model.WebWatchedFolder;
6
7 /**
8 * Interface to Watched folder Service
9 *
10 * @author julien@busyboxes.ch
11 */
12 public interface WatchedFolderService {
13
14 /**
15 * Returns the list of all watched folders
16 *
17 * @return the list of all watched folders
18 */
19 public List<WebWatchedFolder> getAllWatchedFolders();
20
21 /**
22 * Creates a new watched folder with the given path
23 *
24 * @param folderPath a folder's path
25 * @return the created watched folder
26 */
27 public WebWatchedFolder createWatchedFolderByPath(String folderPath);
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 WebWatchedFolder getWatchedFolderById(Long folderId);
36
37 /**
38 * Refreshes the files present in the given folder
39 *
40 * @param folderId the watched folder ID
41 */
42 public void refreshWatchedFilesInWatchedFolder(Long folderId);
43
44 /**
45 * Deletes the given watched folder
46 *
47 * @param folderId the watched folder ID
48 */
49 public void deleteWatchedFolder(Long folderId);
50
51 }