KickJava   Java API By Example, From Geeks To Geeks.

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


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 javax.faces.render.* ;
9 import javax.faces.context.FacesContext ;
10 /**
11  * Apr 10, 2004
12  * @author: Tuan Nguyen
13  * @email: tuan08@users.sourceforge.net
14  * @version: $Id: MockRenderKitFactory.java,v 1.1 2004/10/11 23:27:25 tuan08 Exp $
15  **/

16 public class MockRenderKitFactory extends RenderKitFactory {
17     private HashMap JavaDoc map_ ;
18     
19   public MockRenderKitFactory() {
20     map_ = new HashMap JavaDoc() ;
21   }
22     
23   public void addRenderKit(String JavaDoc renderKitId, RenderKit renderKit) {
24     map_.put(renderKitId, renderKit) ;
25   }
26   
27   public RenderKit getRenderKit(FacesContext context, String JavaDoc renderKitId) {
28     return (RenderKit) map_.get(renderKitId) ;
29   }
30   
31   public java.util.Iterator JavaDoc getRenderKitIds() {
32    return null ;
33   }
34 }
35
Popular Tags