2 * jSite2 - Entry.java -
3 * Copyright © 2008 David Roden
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.
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.
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.
20 package net.pterodactylus.jsite.project;
25 * A file is an entry in a directory. Its name can contain multiple components,
26 * separated by the platform’s {@link File#separatorChar}.
28 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
30 public interface Entry {
33 * Returns the name of the file. The name can contain multiple path
34 * components, separated by the platform’s {@link File#separatorChar}. It
35 * will never start with a separator, though.
37 * @return The name of the file
39 public String getName();
42 * Sets the name of the file.
45 * The name of the file
47 public void setName(String name);
50 * Returns whether this file should be inserted.
52 * @return <code>true</code> to insert the file, <code>false</code> to
55 public boolean isInsert();
58 * Sets whether this file should be inserted.
61 * <code>true</code> to insert the file, <code>false</code>
64 public void setInsert(boolean insert);
67 * Returns the content type of the file. If the content type is
68 * <code>null</code>, the node will auto-detect the content type based on
69 * the filename. The content type is given as a MIME type.
71 * @return The content of the file
73 public String getContentType();
76 * Sets the content type of the file.
79 * The content type of the file
81 public void setContentType(String contentType);