KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > impl > portletAPIImp > PortletAPIObjectFactory


1 package org.exoplatform.services.portletcontainer.impl.portletAPIImp;
2
3 import javax.portlet.PortletContext;
4 import javax.servlet.ServletContext JavaDoc;
5 import java.net.URLClassLoader JavaDoc;
6
7 /**
8  * Copyright 2001-2003 The eXo platform SARL All rights reserved.
9  * Please look at license.txt in info directory for more license detail.
10  **/

11
12 /**
13  * Created by the Exo Development team.
14  * Author : Mestrallet Benjamin
15  * benjmestrallet@users.sourceforge.net
16  * Date: 11 nov. 2003
17  * Time: 19:52:26
18  */

19 public class PortletAPIObjectFactory {
20
21   private static PortletAPIObjectFactory ourInstance;
22
23   public synchronized static PortletAPIObjectFactory getInstance() {
24     if (ourInstance == null) {
25       ourInstance = new PortletAPIObjectFactory();
26     }
27     return ourInstance;
28   }
29
30   private PortletAPIObjectFactory() {
31   }
32
33   public PortletContext createPortletContext(ServletContext JavaDoc scontext) {
34     return new PortletContextImpl(scontext) ;
35   }
36
37   public PortletContext createPortletContext(ServletContext JavaDoc scontext, URLClassLoader JavaDoc cl) {
38     return new PortletContextImpl(scontext) ;
39   }
40
41 }
Popular Tags