KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > blogunity > render > macro > AbstractMacro


1 /*
2  * $Id: AbstractMacro.java,v 1.1 2004/11/24 18:36:18 michelson Exp $
3  *
4  * Copyright (c) 2004 j2biz Group, http://www.j2biz.com Koeln / Duesseldorf ,
5  * Germany
6  *
7  * @author Max Kalina
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation; either version 2 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22  * Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */

25
26 package com.j2biz.blogunity.render.macro;
27
28 import org.radeox.api.engine.context.InitialRenderContext;
29 import org.radeox.macro.BaseMacro;
30
31 import com.j2biz.blogunity.pojo.Blog;
32 import com.j2biz.blogunity.pojo.User;
33
34 public abstract class AbstractMacro extends BaseMacro {
35
36     protected Blog blog;
37
38     protected String JavaDoc webappName;
39
40     protected User user;
41
42     /*
43      * (non-Javadoc)
44      *
45      * @see org.radeox.macro.BaseMacro#setInitialContext(org.radeox.api.engine.context.InitialRenderContext)
46      */

47     public void setInitialContext(InitialRenderContext context) {
48
49         super.setInitialContext(context);
50         blog = (Blog) initialContext.get("blog");
51         webappName = (String JavaDoc) initialContext.get("webappName");
52         user = (User) initialContext.get("user");
53
54     }
55
56 }
Popular Tags