Updated copyright message.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / htmlindexer / Layout.java
index 5110b3e..25bfd4f 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
- * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ * Copyright (C) 2012 -- 2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
  * as published by the Free Software Foundation.
@@ -9,60 +9,72 @@
 
 package eu.svjatoslav.meviz.htmlindexer;
 
+import eu.svjatoslav.meviz.htmlindexer.metadata.DirectoryMetadata;
+import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
+import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture;
+
+import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.List;
 
-import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
-
 /**
  * In order to have possibility of several different layouts per directory.
  * Universal interface is defined.
- * 
+ * <p>
  * Layout implementation is responsible for actual HTML generation.
  */
 
 public interface Layout {
 
-       /**
-        * Enlist directory.
-        */
-       public void enlistDirectory(AbstractFile directory);
+    /**
+     * Enlist directory.
+     */
+    void enlistDirectory(AbstractFile directory,
+                         DirectoryMetadata parentDirectoryMetadata);
+
+    /**
+     * Enlist simple file.
+     */
+    void enlistFile(AbstractFile file,
+                    DirectoryMetadata parentDirectoryMetadata);
 
-       /**
-        * Enlist simple file.
-        */
-       public void enlistFile(AbstractFile file);
+    /**
+     * Enlist image file.
+     */
+    void enlistImage(Picture picture,
+                     DirectoryMetadata parentDirectoryMetadata);
 
-       /**
-        * Enlist image file.
-        */
-       public void enlistImage(AbstractFile picture);
+    /**
+     * Enlist video in OGV format.
+     *
+     * @throws UnsupportedEncodingException
+     */
+    void enlistOgv(AbstractFile file,
+                   DirectoryMetadata parentDirectoryMetadata)
+    ;
 
-       /**
-        * Enlist video in OGV format.
-        * 
-        * @throws UnsupportedEncodingException
-        */
-       public void enlistOgv(AbstractFile file)
-                       throws UnsupportedEncodingException;
+    /**
+     * Return layout specific suffix that will be appended between
+     * index(suffix).html of generated file. This way multiple layouts can
+     * coexist in the same directory, each residing in its own HTML file.
+     */
+    String getFileNameSuffix();
 
-       /**
-        * Return layout specific suffix that will be appended between
-        * index(suffix).html of generated file. This way multiple layouts can
-        * coexist in the same directory, each residing in its own HTML file.
-        */
-       public String getFileNameSuffix();
+    /**
+     * After necessary files have been enlisted for particular directory, use
+     * this method to retrieve generated HTML result.
+     *
+     * @throws IOException
+     */
+    String getHtml(final boolean showTitle,
+                   final boolean doHtmlHeaderAndFooter, DirectoryMetadata metadata)
+    ;
 
-       /**
-        * After necessary files have been enlisted for particular directory, use
-        * this method to retrieve generated HTML result.
-        */
-       public String getHtml(final boolean showTitle,
-                       final boolean doHtmlHeaderAndFooter);
+    /**
+     * Initialize layout for particular directory.
+     */
+    void init(String galleryTitle, List<String> path,
+              final AbstractIndexer indexer, IndexingContext context);
 
-       /**
-        * Initialize layout for particular directory.
-        */
-       public void init(String galleryTitle, List<String> path,
-                       final AbstractIndexer indexer, IndexingContext context);
+    void enlistWebm(AbstractFile file, DirectoryMetadata directory);
 }