Coverage Report - org.mule.tools.visualizer.postgraphers.DocIndexerPostGrapher
 
Classes in this File Line Coverage Branch Coverage Complexity
DocIndexerPostGrapher
100%
10/10
50%
1/2
1.333
 
 1  
 /*
 2  
  * $Id: DocIndexerPostGrapher.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 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  
      * (non-Javadoc)
 36  
      * 
 37  
      * @see org.mule.tools.visualizer.PostGrapher#postGrapher(org.mule.tools.visualizer.GraphConfig)
 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  
 }