1 package org.apache.turbine.pipeline; 2 3 56 57 import java.io.IOException ; 58 59 import org.apache.commons.logging.Log; 60 import org.apache.commons.logging.LogFactory; 61 import org.apache.turbine.RunData; 62 import org.apache.turbine.TurbineException; 63 import org.apache.turbine.ValveContext; 64 65 72 public class JGenRendererValve 73 extends AbstractValve 74 { 75 private static final Log log = LogFactory.getLog( JGenRendererValve.class ); 76 77 80 public void invoke(RunData data, ValveContext context) 81 throws IOException , TurbineException 82 { 83 try 84 { 85 String target = data.getTarget(); 86 87 if ( log.isDebugEnabled() ) 88 { 89 log.debug( "Rendering target " + target ); 90 } 91 92 JGenRenderer r = new JGenRenderer( data ); 93 94 r.render( target ); 95 } 96 catch (Exception e) 97 { 98 throw new TurbineException( e ); 99 } 100 101 context.invokeNext(data); 103 } 104 } 105 106 | Popular Tags |