KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > om > window > impl > PortletWindowImpl


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
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 JavaDoc id;
32     private PortletEntity portletEntity;
33
34     public PortletWindowImpl(String JavaDoc id) {
35         this.id = id;
36     }
37
38     // PortletWindow implementation.
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     // PortletWindowCtrl implementation.
64
/**
65      * binds an identifier to this portlet window
66      *
67      * @param id the new identifier
68      */

69     public void setId(String JavaDoc 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 }
Popular Tags