org.apache.turbine.services.webmacro
Class TurbineWebMacro

java.lang.Object
  |
  +--org.apache.turbine.services.webmacro.TurbineWebMacro

public abstract class TurbineWebMacro
extends java.lang.Object

This is a simple static accessor to common WebMacro tasks such as getting an instance of a context as well as handling a request for processing a template. It uses the TurbineWebMacroService to obtain an instance of WebMacro. WebContext context = WebMacro.getContext(data); context.put("message", "Hello from Turbine!"); String results = WebMacro.handleRequest(context,"helloWorld.wm"); data.getPage().getBody().addElement(results);

Version:
$Id: TurbineWebMacro.java,v 1.1.1.1 2001/08/16 05:09:26 jvanzyl Exp $
Author:
Jon S. Stevens, Daniel Rall

Constructor Summary
TurbineWebMacro()
          Deprecated.  
 
Method Summary
static org.webmacro.servlet.WebContext getContext()
          Deprecated. This method returns a blank WebContext object.
static org.webmacro.servlet.WebContext getContext(RunData data)
          Deprecated. This returns a WebContext that you can pass into handleRequest once you have populated it with information that the template will know about.
protected static WebMacroService getService()
          Deprecated. Utility method for accessing the service implementation.
static java.lang.String handleRequest(org.webmacro.servlet.WebContext context, java.lang.String templateFilePath)
          Deprecated.  
static void handleRequest(org.webmacro.servlet.WebContext context, java.lang.String filename, java.io.OutputStream out)
          Deprecated.  
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

TurbineWebMacro

public TurbineWebMacro()
Deprecated. 
Method Detail

getService

protected static final WebMacroService getService()
Deprecated. 
Utility method for accessing the service implementation.
Returns:
A WebMacroService implementation instance.

handleRequest

public static void handleRequest(org.webmacro.servlet.WebContext context,
                                 java.lang.String filename,
                                 java.io.OutputStream out)
                          throws java.lang.Exception
Deprecated. 
See Also:
WebMacroService.handleRequest(org.webmacro.servlet.WebContext, java.lang.String)

handleRequest

public static java.lang.String handleRequest(org.webmacro.servlet.WebContext context,
                                             java.lang.String templateFilePath)
                                      throws java.lang.Exception
Deprecated. 
See Also:
WebMacroService.handleRequest(org.webmacro.servlet.WebContext, java.lang.String)

getContext

public static org.webmacro.servlet.WebContext getContext(RunData data)
Deprecated. 
This returns a WebContext that you can pass into handleRequest once you have populated it with information that the template will know about.
Parameters:
data - A Turbine RunData.
Returns:
A WebContext.

getContext

public static org.webmacro.servlet.WebContext getContext()
Deprecated. 
This method returns a blank WebContext object.
Returns:
A WebContext.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.