Coverage report

  %line %branch
be.dvw.administration.mvc.taglibs.LeftMenuTag
0% 
0% 

 1  
 package be.dvw.administration.mvc.taglibs;
 2  
 
 3  
 import be.dvw.administration.mvc.navigation.LeftMenu;
 4  
 import be.dvw.administration.mvc.navigation.LeftMenuXSLTImpl;
 5  
 import org.apache.commons.logging.Log;
 6  
 import org.apache.commons.logging.LogFactory;
 7  
 import org.dom4j.DocumentException;
 8  
 import org.dom4j.io.OutputFormat;
 9  
 import org.dom4j.io.XMLWriter;
 10  
 
 11  
 import javax.servlet.jsp.JspException;
 12  
 import javax.servlet.jsp.tagext.BodyTagSupport;
 13  
 import javax.xml.transform.TransformerException;
 14  
 import java.io.IOException;
 15  
 import java.io.UnsupportedEncodingException;
 16  
 
 17  
 /**
 18  
  * Created by IntelliJ IDEA.
 19  
  * User: Toon.Timbermont
 20  
  * Date: Mar 22, 2005
 21  
  * Time: 9:21:24 PM
 22  
  * To change this template use File | Settings | File Templates.
 23  
  */
 24  0
 public class LeftMenuTag extends BodyTagSupport {
 25  
 
 26  
 
 27  0
     private static Log LOG = LogFactory.getLog(LeftMenuTag.class);
 28  
     private String currentItem;
 29  
 
 30  
     /**
 31  
      * Code executed when this tag is called
 32  
      * @return  SKIP_BODY : this tag does not have a body;
 33  
      * @throws javax.servlet.jsp.JspException
 34  
      */
 35  
     public int doStartTag() throws JspException {
 36  
 
 37  0
         LOG.debug("Executing the LeftMenuTag for currentItem " + currentItem);
 38  
         LeftMenu menu;
 39  
         try {
 40  0
             menu = new LeftMenuXSLTImpl(currentItem);
 41  0
             OutputFormat format = OutputFormat.createPrettyPrint();
 42  
             XMLWriter writer;
 43  0
             writer = new XMLWriter( pageContext.getOut() , format );
 44  0
             writer.write( menu.getCurrentMenu() );
 45  0
         } catch (DocumentException e) {
 46  0
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
 47  0
         } catch (TransformerException e) {
 48  0
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
 49  0
         } catch (UnsupportedEncodingException e) {
 50  0
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
 51  0
         } catch (IOException e) {
 52  0
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
 53  0
         }
 54  0
         return SKIP_BODY;
 55  
     }
 56  
 
 57  
     /**
 58  
      * Code executed when the tag reaches its end
 59  
      * @return EVAL_PAGE : the rest of the page must be evaluated as well
 60  
      * @throws JspException
 61  
      */
 62  
     public int doEndTag() throws JspException {
 63  0
         return EVAL_PAGE;
 64  
     }
 65  
 
 66  
     /**
 67  
      * Getter for the attribute currentItem
 68  
      * @return
 69  
      */
 70  
     public String getCurrentItem() {
 71  0
         LOG.debug("Returning the currentItem " + currentItem);
 72  0
         return currentItem;
 73  
     }
 74  
 
 75  
     /**
 76  
      * Setter for the attribute currentItem
 77  
      * @param currentItem
 78  
      */
 79  
     public void setCurrentItem(String currentItem) {
 80  0
         LOG.debug("Setting the currentItem to " + currentItem);
 81  0
         this.currentItem = currentItem;
 82  0
     }
 83  
 
 84  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.