KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portal > model > Portlet


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.services.portal.model;
6
7 import org.exoplatform.services.portletcontainer.pci.model.ExoPortletPreferences;
8 /**
9  * May 13, 2004
10  * @author: Tuan Nguyen
11  * @email: tuan08@users.sourceforge.net
12  * @version: $Id: Portlet.java,v 1.7 2004/09/30 01:00:05 tuan08 Exp $
13  **/

14 public class Portlet extends Component {
15   private String JavaDoc title;
16   private String JavaDoc windowId ;
17   private String JavaDoc portletStyle = "default" ;
18   private boolean showInfoBar = true ;
19   private boolean showWindowState = true ;
20   private boolean showPortletMode = true ;
21   private ExoPortletPreferences portletPreferences ;
22   
23   public String JavaDoc getTitle() { return title ; }
24   public void setTitle(String JavaDoc s) { title = s ;}
25   
26   public String JavaDoc getWindowId() { return windowId ; }
27   public void setWindowId(String JavaDoc s) { windowId = s ;}
28   
29   public String JavaDoc getPortletStyle() { return portletStyle ; }
30   public void setPortletStyle(String JavaDoc s) { portletStyle = s ;}
31   
32   public boolean getShowInfoBar() { return showInfoBar ; }
33   public void setShowInfoBar(boolean b) { showInfoBar = b ; }
34   
35   public boolean getShowWindowState() { return showWindowState ; }
36   public void setShowWindowState(boolean b) { showWindowState = b ; }
37   
38   public boolean getShowPortletMode() { return showPortletMode ; }
39   public void setShowPortletMode(boolean b) { showPortletMode = b ; }
40   
41   public ExoPortletPreferences getPortletPreferences() { return portletPreferences ; }
42   public void setPortletPreferences(ExoPortletPreferences prefs) { portletPreferences = prefs ; }
43   
44   public Component softCloneObject() {
45     Portlet portlet = new Portlet() ;
46     portlet.copyBasicProperties(this) ;
47     portlet.setTitle(title) ;
48     portlet.setWindowId(windowId) ;
49     portlet.setPortletStyle(portletStyle) ;
50     portlet.setShowInfoBar(showInfoBar) ;
51     portlet.setShowWindowState(showWindowState) ;
52     portlet.setShowPortletMode(showPortletMode) ;
53     portlet.setPortletPreferences(portletPreferences);
54     return portlet ;
55   }
56 }
Popular Tags