1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.portalImpl.om.window.impl;
21
22 import org.apache.pluto.om.window.*;
23 import org.apache.pluto.om.entity.*;
24 import org.apache.pluto.om.common.ObjectID;
25
26 public class PortletWindowImpl implements PortletWindow, PortletWindowCtrl {
27
28
29 private ObjectID objectId;
30 private String id;
31 private PortletEntity portletEntity;
32
33
34 private static int counter;
35
36 public PortletWindowImpl(String id) {
37 this.id = id;
38 }
39
40
41
42 /***
43 * Returns the identifier of this portlet instance window as object id
44 *
45 * @return the object identifier
46 **/
47 public ObjectID getId()
48 {
49 if (objectId==null)
50 {
51 objectId = org.apache.pluto.portalImpl.util.ObjectID.createFromString(id);
52 }
53 return objectId;
54 }
55 /***
56 * Returns the portlet entity
57 *
58 * @return the portlet entity
59 **/
60 public PortletEntity getPortletEntity()
61 {
62 return portletEntity;
63 }
64
65
66 /***
67 * binds an identifier to this portlet window
68 *
69 * @param id the new identifier
70 */
71 public void setId(String id)
72 {
73 this.id = id;
74 objectId = null;
75 }
76
77 /***
78 * binds a portlet instance to this portlet window
79 *
80 * @param portletEntity a portlet entity object
81 **/
82 public void setPortletEntity(PortletEntity portletEntity) {
83 this.portletEntity = portletEntity;
84 }
85
86 }