KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > test > mocks > jsf > MockRenderKit


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.test.mocks.jsf;
6
7 import java.util.HashMap JavaDoc ;
8 import java.io.Writer JavaDoc ;
9 import java.io.OutputStream JavaDoc ;
10 import javax.faces.render.* ;
11 import javax.faces.context.* ;
12 /**
13  * Apr 10, 2004
14  * @author: Tuan Nguyen
15  * @email: tuan08@users.sourceforge.net
16  * @version: $Id: MockRenderKit.java,v 1.1 2004/10/11 23:27:25 tuan08 Exp $
17  **/

18 public class MockRenderKit extends RenderKit {
19   private HashMap JavaDoc map_ ;
20   
21     public MockRenderKit() {
22         map_ = new HashMap JavaDoc() ;
23   }
24   
25   public void addRenderer(String JavaDoc family, java.lang.String JavaDoc rendererType, Renderer renderer) {
26     map_.put(family + "/" + rendererType, renderer ) ;
27   }
28   
29   public Renderer getRenderer(String JavaDoc family, String JavaDoc rendererType) {
30     return (Renderer) map_.get(family + "/" + rendererType) ;
31   }
32   
33   public ResponseStateManager getResponseStateManager() {
34     return null ;
35   }
36   
37   public ResponseWriter createResponseWriter(Writer JavaDoc writer, String JavaDoc contentTypeList,
38                                              String JavaDoc characterEncoding) {
39     return null ;
40   }
41   
42   public ResponseStream createResponseStream(OutputStream JavaDoc out) {
43     return null ;
44   }
45 }
Popular Tags