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.common.ObjectID;
23 import org.apache.pluto.om.entity.PortletEntity;
24 import org.apache.pluto.om.window.PortletWindow;
25 import org.apache.pluto.om.window.PortletWindowCtrl;
26
27 public class PortletWindowImpl implements PortletWindow, PortletWindowCtrl {
28
29
30 private ObjectID objectId;
31 private String id;
32 private PortletEntity portletEntity;
33
34 public PortletWindowImpl(String id) {
35 this.id = id;
36 }
37
38
39
40 /***
41 * Returns the identifier of this portlet instance window as object id
42 *
43 * @return the object identifier
44 **/
45 public ObjectID getId()
46 {
47 if (objectId==null)
48 {
49 objectId = org.apache.pluto.portalImpl.util.ObjectID.createFromString(id);
50 }
51 return objectId;
52 }
53 /***
54 * Returns the portlet entity
55 *
56 * @return the portlet entity
57 **/
58 public PortletEntity getPortletEntity()
59 {
60 return portletEntity;
61 }
62
63
64 /***
65 * binds an identifier to this portlet window
66 *
67 * @param id the new identifier
68 */
69 public void setId(String id)
70 {
71 this.id = id;
72 objectId = null;
73 }
74
75 /***
76 * binds a portlet instance to this portlet window
77 *
78 * @param portletEntity a portlet entity object
79 **/
80 public void setPortletEntity(PortletEntity portletEntity) {
81 this.portletEntity = portletEntity;
82 }
83
84 }