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 | 4 | super(env); |
27 | 4 | template = env.getProperties().getProperty("muleDocIndexerTemplate"); |
28 | 4 | if (template == null) |
29 | |
{ |
30 | 4 | template = DEFAULT_MULE_DOC_INDEXER_TEMPLATE; |
31 | |
} |
32 | 4 | } |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
public void postGrapher(GraphEnvironment env) |
40 | |
{ |
41 | 4 | File[] htmlFiles = getFiles(env.getConfig(), ".html"); |
42 | 4 | String targetFile = env.getConfig().applyOutputDirectory( |
43 | |
env.getProperty("muleDocIndexerOutputName", "index.html")); |
44 | 4 | doRendering(env, htmlFiles, template, targetFile); |
45 | |
|
46 | 4 | } |
47 | |
|
48 | |
public String getStatusTitle() |
49 | |
{ |
50 | 4 | return "Generating Index page"; |
51 | |
} |
52 | |
|
53 | |
} |