1 /*
2 * $Id: GHBuilder.java 2993 2011-11-24 19:51:48Z andrewinkler $
3 * ============================================================================
4 * Project gluehloch-homepage-core
5 * Copyright (c) 2004-2007 by Andre Winkler. All rights reserved.
6 * ============================================================================
7 * GNU LESSER GENERAL PUBLIC LICENSE
8 * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26 package de.awtools.homegen.directory;
27
28 import java.io.File;
29 import java.util.List;
30
31 /**
32 * Erstellt eine Implementierung von {@link GHDirectory} oder {@link GHFile}.
33 *
34 * @version $LastChangedRevision: 2993 $ $LastChangedDate: 2011-11-24 20:51:48 +0100 (Thu, 24 Nov 2011) $
35 * @author by Andre Winkler, $LastChangedBy: andrewinkler $
36 *
37 * @since 1.5
38 */
39 public interface GHBuilder {
40
41 /**
42 * Erstellt den Root-Directory-Eintrag.
43 *
44 * @param directory Das zugeordnete Java-File Objekt.
45 * @return Der generierte Verzeichniseintrag.
46 */
47 public GHDirectory buildRootDirectory(File directory);
48
49 /**
50 * Erstellt einen Directory-Eintrag. Die Verlinkung zwischen
51 * Parent-Directory und dem erstellten Directory wird ebenfalls
52 * vorgenommnen.
53 *
54 * @param parentDirectory Das übergeordnete Verzeichnis.
55 * @param directory Das File Handle.
56 * @param dirName Verzeichnisname.
57 * @return Der erstellte Directory Eintrag.
58 */
59 public GHDirectory buildDirectory(GHDirectory parentDirectory,
60 File directory, String dirName);
61
62 /**
63 * Erstellt einen File-Eintrag.
64 *
65 * @param file File Handle.
66 * @param directory Das zugeordnete Verzeichnis.
67 * @param name Name des Files.
68 * @return Der erstellte File Eintrag.
69 */
70 public GHFile buildFile(File file, GHDirectory directory, String name);
71
72 /**
73 * Filtert ein Verzeichnis nach den in Frage kommenden Dateien.
74 *
75 * @param parentDirectory Das Verzeichnis das untersucht wird.
76 * @return Die in Frage kommenden Dateien.
77 */
78 public List<File> findFiles(GHDirectory parentDirectory);
79
80 }