01: /*
02: * Copyright (c) 2002-2006 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.components.template;
06:
07: import com.opensymphony.webwork.components.UIBean;
08: import com.opensymphony.xwork.util.OgnlValueStack;
09:
10: import java.io.Writer;
11: import java.util.Map;
12:
13: /**
14: * Context used when rendering templates.
15: *
16: * @author jcarreira
17: */
18: public class TemplateRenderingContext {
19: Template template;
20: OgnlValueStack stack;
21: Map parameters;
22: UIBean tag;
23: Writer writer;
24:
25: /**
26: * Constructor
27: *
28: * @param template the template.
29: * @param writer the writer.
30: * @param stack OGNL value stack.
31: * @param params parameters to this template.
32: * @param tag the tag UI component.
33: */
34: public TemplateRenderingContext(Template template, Writer writer,
35: OgnlValueStack stack, Map params, UIBean tag) {
36: this .template = template;
37: this .writer = writer;
38: this .stack = stack;
39: this .parameters = params;
40: this .tag = tag;
41: }
42:
43: public Template getTemplate() {
44: return template;
45: }
46:
47: public OgnlValueStack getStack() {
48: return stack;
49: }
50:
51: public Map getParameters() {
52: return parameters;
53: }
54:
55: public UIBean getTag() {
56: return tag;
57: }
58:
59: public Writer getWriter() {
60: return writer;
61: }
62: }
|