1
2
3
4
5
6
7
8
9
10
11 package org.mule.tools.visualizer.postgraphers;
12
13 import org.mule.tools.visualizer.config.GraphEnvironment;
14
15 import java.io.File;
16
17 public class DocIndexerPostGrapher extends AbstractIndexer
18 {
19
20 public static final String DEFAULT_MULE_DOC_INDEXER_TEMPLATE = "template/doc-index.vm";
21
22 private String template;
23
24 public DocIndexerPostGrapher(GraphEnvironment env) throws Exception
25 {
26 super(env);
27 template = env.getProperties().getProperty("muleDocIndexerTemplate");
28 if (template == null)
29 {
30 template = DEFAULT_MULE_DOC_INDEXER_TEMPLATE;
31 }
32 }
33
34
35
36
37
38
39 public void postGrapher(GraphEnvironment env)
40 {
41 File[] htmlFiles = getFiles(env.getConfig(), ".html");
42 String targetFile = env.getConfig().applyOutputDirectory(
43 env.getProperty("muleDocIndexerOutputName", "index.html"));
44 doRendering(env, htmlFiles, template, targetFile);
45
46 }
47
48 public String getStatusTitle()
49 {
50 return "Generating Index page";
51 }
52
53 }