d16e6be2c67e69aad205d23dc55219122aec2a38
[jSite2.git] / src / net / pterodactylus / jsite / project / Entry.java
1 /*
2  * jSite2 - Entry.java -
3  * Copyright © 2008 David Roden
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 package net.pterodactylus.jsite.project;
21
22 /**
23  * A file is an entry in a directory. Its name can contain multiple components
24  * (separated by a slash, ‘/’).
25  * 
26  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
27  * @version $Id$
28  */
29 public interface Entry {
30
31         /**
32          * Returns the name of the file. The name can contain multiple path
33          * components, separated by a slash (‘/’). It will never start with a slash,
34          * though.
35          * 
36          * @return The name of the file
37          */
38         public String getName();
39
40         /**
41          * Sets the name of the file.
42          * 
43          * @param name
44          *            The name of the file
45          */
46         public void setName(String name);
47
48         /**
49          * Returns whether this file should be inserted.
50          * 
51          * @return <code>true</code> to insert the file, <code>false</code> to
52          *         skip it
53          */
54         public boolean isInsert();
55
56         /**
57          * Sets whether this file should be inserted.
58          * 
59          * @param insert
60          *            <code>true</code> to insert the file, <code>false</code>
61          *            to skip it
62          */
63         public void setInsert(boolean insert);
64
65         /**
66          * Returns the content type of the file. If the content type is
67          * <code>null</code>, the node will auto-detect the content type based on
68          * the filename. The content type is given as a MIME type.
69          * 
70          * @return The content of the file
71          */
72         public String getContentType();
73
74         /**
75          * Sets the content type of the file.
76          * 
77          * @param contentType
78          *            The content type of the file
79          */
80         public void setContentType(String contentType);
81
82 }