| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| NewPicScanner |
|
| 1.0;1 |
| 1 | /****************************************************************************** | |
| 2 | * NewPicScanner.java - Interface for jsp to run the NewPicScanner function | |
| 3 | * | |
| 4 | * PicMan - The BuckoSoft Picture Manager in Java | |
| 5 | * Copyright(c) 2005 - Dick Balaska | |
| 6 | * | |
| 7 | */ | |
| 8 | package com.buckosoft.PicMan.business; | |
| 9 | ||
| 10 | import java.io.File; | |
| 11 | import java.util.ArrayList; | |
| 12 | import java.util.List; | |
| 13 | ||
| 14 | /** Interface for jsp to run the NewPicScanner process | |
| 15 | * @author Dick Balaska | |
| 16 | * @since 2005/07/28 | |
| 17 | * @version $Revision: 1.1 $ <br> $Date: 2013/12/26 01:26:07 $ | |
| 18 | * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/business/NewPicScanner.java">NewPicScanner.java</a> | |
| 19 | */ | |
| 20 | public interface NewPicScanner { | |
| 21 | ||
| 22 | /** Set the list of file extensions that can be Pics. | |
| 23 | * @param picExtensions A List of extensions, without the period. "jpg", "png". In the end, i am only running with "jpg" right now. | |
| 24 | */ | |
| 25 | void setPicExtensions(List<String> picExtensions); | |
| 26 | ||
| 27 | /** calling getNewPicCount() runs the scanner and returns the number of pics found. | |
| 28 | * @return The number of pics that exist under the {@link com.buckosoft.PicMan.domain.Root}s | |
| 29 | * that are not in the database. | |
| 30 | * @throws Exception | |
| 31 | */ | |
| 32 | int getNewPicCount() throws Exception; | |
| 33 | ||
| 34 | /** Get a list of the Files (Pics) found by running getNewPicCount() | |
| 35 | * @return The List of Files | |
| 36 | */ | |
| 37 | ArrayList<File> getNewPics(); | |
| 38 | ||
| 39 | /** process any new pics that we've found. Add them to the database, etc. | |
| 40 | * @return success | |
| 41 | */ | |
| 42 | boolean processNewPics(); | |
| 43 | ||
| 44 | /** If an error occurred during processNewPics, then it will be found here. | |
| 45 | * @return An error string | |
| 46 | */ | |
| 47 | String getProcessNewPicsErrorMessage(); | |
| 48 | ||
| 49 | } |