org.codehaus.plexus.summit.pull.tools
Class TemplateRenderer

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.summit.AbstractSummitComponent
          extended byorg.codehaus.plexus.summit.resolver.AbstractResolver
              extended byorg.codehaus.plexus.summit.pull.tools.TemplateRenderer
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.logging.LogEnabled, RequestTool, Resolver, SummitComponent

public class TemplateRenderer
extends AbstractResolver
implements RequestTool

This class is a hack that allows you to render templates via the old Turbine 3 style. It resolves the template, then looks up the renderer to render the template it.

Since:
Feb 13, 2003
Author:
Dan Diephouse

Field Summary
 
Fields inherited from interface org.codehaus.plexus.summit.resolver.Resolver
ROLE
 
Constructor Summary
TemplateRenderer()
           
 
Method Summary
protected  Renderer getRenderer(java.lang.String target)
           
 void refresh()
          Refresh the application tool.
 java.lang.String render(java.lang.String basedir, java.lang.String target)
           
 Resolution resolve(java.lang.String view)
           
 void setRunData(RunData data)
          Initialize the RequestTool with RunData from the request.
 
Methods inherited from class org.codehaus.plexus.summit.resolver.AbstractResolver
getDefaultView, getErrorView, getInitialView, getResultMessagesView, getView, getView, getView
 
Methods inherited from class org.codehaus.plexus.summit.AbstractSummitComponent
contextualize, getContainer, lookup, lookup
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateRenderer

public TemplateRenderer()
Method Detail

setRunData

public void setRunData(RunData data)
Description copied from interface: RequestTool
Initialize the RequestTool with RunData from the request.

Specified by:
setRunData in interface RequestTool
Parameters:
data - initialization data

refresh

public void refresh()
Description copied from interface: RequestTool
Refresh the application tool. This is necessary for development work where you probably want the tool to refresh itself if it is using configuration information that is typically cached after initialization

Specified by:
refresh in interface RequestTool

render

public java.lang.String render(java.lang.String basedir,
                               java.lang.String target)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getRenderer

protected Renderer getRenderer(java.lang.String target)
                        throws java.lang.Exception
Specified by:
getRenderer in class AbstractResolver
Throws:
java.lang.Exception

resolve

public Resolution resolve(java.lang.String view)
                   throws java.lang.Exception
Specified by:
resolve in interface Resolver
Throws:
java.lang.Exception


Copyright © 2001-2007 Codehaus. All Rights Reserved.