KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > communication > forum > component > UIForumAdminController


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.portlets.communication.forum.component;
6
7 import java.util.* ;
8 import javax.portlet.PortletPreferences;
9 import org.exoplatform.Constants;
10 import org.exoplatform.faces.FacesUtil;
11 import org.exoplatform.faces.core.component.UIPortlet;
12 import org.exoplatform.services.communication.forum.*;
13
14 /**
15  * Fri, Jan 16, 2004 @ 21:43
16  * @author: Tuan Nguyen
17  * @email: tuan08@users.sourceforge.net
18  * @version: $Id: UIForumAdminController.java,v 1.5 2004/06/28 03:32:21 tuan08 Exp $
19  */

20 public class UIForumAdminController extends UIPortlet {
21   public UIForumAdminController(ForumServiceContainer container) throws Exception JavaDoc {
22     setId("UIForumAdminPortlet");
23     setRendererType("ChildrenRenderer") ;
24     PortletPreferences prefs = FacesUtil.getPortletPreferences() ;
25     String JavaDoc owner = prefs.getValue("forum-owner", Constants.DEFAUL_PORTAL_OWNER) ;
26     ForumService service = container.findForumService(owner) ;
27
28     List children = getChildren() ;
29     UIAdminViewCategories uiCategories = new UIAdminViewCategories(service) ;
30     uiCategories.setRendered(true) ;
31     children.add(uiCategories) ;
32
33     UICategoryForm uiCategoryForm = new UICategoryForm(service) ;
34     uiCategoryForm.setRendered(false) ;
35     children.add(uiCategoryForm) ;
36
37     UIForumForm uiForumForm = new UIForumForm(service) ;
38     uiForumForm.setRendered(false) ;
39     children.add(uiForumForm) ;
40   }
41 }
Popular Tags