01: /*
02: * This file is part of PFIXCORE.
03: *
04: * PFIXCORE is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU Lesser General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * PFIXCORE is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public License
15: * along with PFIXCORE; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package de.schlund.pfixcore.editor2.core.dom;
20:
21: import java.io.File;
22: import java.util.Collection;
23:
24: import de.schlund.pfixcore.editor2.core.exception.EditorIOException;
25: import de.schlund.pfixcore.editor2.core.exception.EditorSecurityException;
26:
27: /**
28: * Represents an image that is used by one or several include parts.
29: *
30: * @author Sebastian Marsching <sebastian.marsching@1und1.de>
31: */
32: public interface Image extends Comparable<Image> {
33: /**
34: * Returns the path to the image file (relative to docroot)
35: *
36: * @return Path to image file
37: */
38: String getPath();
39:
40: /**
41: * Returns Enumeration containing all Page objects which are affected by
42: * this Image. This list is allways recursive, which means all pages which
43: * are directly or indirectly depending on this Image are returned.
44: *
45: * @return All affected pages of this Target
46: * @see Page
47: */
48: Collection<Page> getAffectedPages();
49:
50: /**
51: * Replaces the current image file with the new one.
52: *
53: * @param newFile File with new image to use
54: * @throws EditorSecurityException
55: */
56: void replaceFile(File newFile) throws EditorIOException,
57: EditorSecurityException;
58:
59: /**
60: * Returns the last time this image was modified in microseconds
61: * since 01/01/1970 00:00:00 GMT. If the file cannot be found
62: * <code>0</code> is returned.
63: *
64: * @return Time of last modification
65: */
66: long getLastModTime();
67: }
|