Possibility to disable HTML header and footer and title.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / htmlindexer / Layout.java
1 /*
2  * Meviz - Various tools collection to work with multimedia.
3  * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
4  * 
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU General Public License
7  * as published by the Free Software Foundation.
8  */
9
10 package eu.svjatoslav.meviz.htmlindexer;
11
12 import java.io.UnsupportedEncodingException;
13 import java.util.List;
14
15 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
16
17 /**
18  * In order to have possibility of several different layouts per directory.
19  * Universal interface is defined.
20  * 
21  * Layout implementation is responsible for actual HTML generation.
22  */
23
24 public interface Layout {
25
26         /**
27          * Enlist directory.
28          */
29         public void enlistDirectory(AbstractFile directory);
30
31         /**
32          * Enlist simple file.
33          */
34         public void enlistFile(AbstractFile file);
35
36         /**
37          * Enlist image file.
38          */
39         public void enlistImage(AbstractFile picture);
40
41         /**
42          * Enlist video in OGV format.
43          * 
44          * @throws UnsupportedEncodingException
45          */
46         public void enlistOgv(AbstractFile file)
47                         throws UnsupportedEncodingException;
48
49         /**
50          * Return layout specific suffix that will be appended between
51          * index(suffix).html of generated file. This way multiple layouts can
52          * coexist in the same directory, each residing in its own HTML file.
53          */
54         public String getFileNameSuffix();
55
56         /**
57          * After necessary files have been enlisted for particular directory, use
58          * this method to retrieve generated HTML result.
59          */
60         public String getHtml(final boolean showTitle,
61                         final boolean doHtmlHeaderAndFooter);
62
63         /**
64          * Initialize layout for particular directory.
65          */
66         public void init(String galleryTitle, List<String> path,
67                         final AbstractIndexer indexer, IndexingContext context);
68 }