Added the old unit tests from the old Photos application again.
[photos] / src / main / java / org / wamblee / photos / model / filesystem / EntryFoundCallback.java
1 /*
2  * Copyright 2005 the original author or authors.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */ 
16 package org.wamblee.photos.model.filesystem;
17
18 import java.io.File;
19 import java.io.IOException;
20 import java.util.List;
21
22 import org.wamblee.photos.model.PhotoEntry;
23
24 /**
25  * Callback for the traverse method call of the filesystem album. 
26  */
27 public interface EntryFoundCallback {
28     /**
29      * Callback executed when a photo entry has been found.
30      * @param aEntries Current list of photo entries.  
31      * @param aThumbnail Path of the thumbnail image. 
32      * @param aPhoto Path of the full-size image. 
33      * @param aPath Path in the photo album. 
34      * @return True if the search should continue, false otherwise. 
35      */
36         boolean photoFound(List<PhotoEntry> aEntries, File aThumbnail, File aPhoto, String aPath);
37     
38     /**
39      * Callback executed when a photo album has been found.
40      * @param aEntries Current list of photo entries.  
41      * @param aAlbum Path of the photo album directory. 
42      * @param aPath Path in the photo album. 
43      * @return True if the search should continue, false otherwise. 
44      * @throws IOException In case of IO problems. 
45      */
46         boolean albumFound(List<PhotoEntry> aEntries, File aAlbum, String aPath) throws IOException;
47 }