2 * Meviz - Various tools collection to work with multimedia.
3 * Copyright (C) 2012 -- 2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 3 of the GNU Lesser General Public License
7 * or later as published by the Free Software Foundation.
10 package eu.svjatoslav.meviz.htmlindexer;
12 import eu.svjatoslav.meviz.htmlindexer.metadata.DirectoryMetadata;
13 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
14 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture;
15 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Video;
17 import java.util.List;
20 * In order to have possibility of several different layouts per directory.
21 * Universal interface is defined.
23 * Layout implementation is responsible for actual HTML generation.
26 public interface Layout {
31 void enlistDirectory(AbstractFile directory,
32 DirectoryMetadata parentDirectoryMetadata);
37 void enlistFile(AbstractFile file,
38 DirectoryMetadata parentDirectoryMetadata);
43 void enlistImage(Picture picture,
44 DirectoryMetadata parentDirectoryMetadata);
49 void enlistVideo(Video file);
52 * Return layout specific suffix that will be appended between
53 * index(suffix).html of generated file. This way multiple layouts can
54 * coexist in the same directory, each residing in its own HTML file.
56 String getFileNameSuffix();
59 * After necessary files have been enlisted for particular directory, use
60 * this method to retrieve generated HTML result.
62 String getHtml(final boolean showTitle,
63 final boolean doHtmlHeaderAndFooter, DirectoryMetadata metadata)
67 * Initialize layout for particular directory.
69 void init(String galleryTitle, List<String> path,
70 final AbstractIndexer indexer, IndexingContext context);