KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
8  * May 13, 2004
9  * @author: Tuan Nguyen
10  * @email: tuan08@users.sourceforge.net
11  * @version: $Id: Page.java,v 1.9 2004/11/03 01:23:55 tuan08 Exp $
12  **/

13 public class Page extends Container {
14   final static public String JavaDoc MAXIMIZE_STATE = "maximized" ;
15   final static public String JavaDoc NORMAL_STATE = "normal" ;
16   
17   private String JavaDoc owner ;
18   private String JavaDoc name ;
19   private String JavaDoc icon ;
20   private String JavaDoc state ;
21   private String JavaDoc viewPermission ;
22   private String JavaDoc editPermission ;
23   
24   public Page() {
25     setId("page") ;
26   }
27   
28   public String JavaDoc getOwner() { return owner ; }
29   public void setOwner(String JavaDoc s) { owner = s ; }
30   
31   public String JavaDoc getName() { return name ; }
32   public void setName(String JavaDoc s) { name = s ; }
33   
34   public String JavaDoc getIcon() { return icon ; }
35   public void setIcon(String JavaDoc s) { icon = s ; }
36   
37   public String JavaDoc getState() { return state ; }
38   public void setState(String JavaDoc s) { state = s ; }
39   
40   public String JavaDoc getViewPermission() { return viewPermission ; }
41   public void setViewPermission(String JavaDoc s) { viewPermission = s ; }
42   
43   public String JavaDoc getEditPermission() { return editPermission ; }
44   public void setEditPermission(String JavaDoc s) { editPermission = s ; }
45
46   public String JavaDoc getPageId() { return owner + ":" + name ; }
47   
48   public Page clonePage() throws Exception JavaDoc {
49     return (Page) this.clone() ;
50   }
51   
52   public Component softCloneObject() {
53     Page page = new Page() ;
54     page.copyBasicProperties(this) ;
55     page.setOwner(owner) ;
56     page.setName(name) ;
57         page.setTitle(getTitle()) ;
58         page.setIcon(icon) ;
59         page.setState(state) ;
60         page.setViewPermission(viewPermission) ;
61         page.setEditPermission(editPermission) ;
62         page.getChildren().addAll(getChildren()) ;
63     return page ;
64   }
65 }
Popular Tags