weaver 2003/08/06 12:46:28
Modified: commons/src/java/org/apache/jetspeed/om/common/entity
PortletEntityImpl.java
Log:
Now supports the InitablePortletEntity interface
Revision Changes Path
1.4 +25 -17
jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/om/common/entity/PortletEntityImpl.java
Index: PortletEntityImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/om/common/entity/PortletEntityImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PortletEntityImpl.java 3 Aug 2003 14:59:51 -0000 1.3
+++ PortletEntityImpl.java 6 Aug 2003 19:46:28 -0000 1.4
@@ -53,12 +53,10 @@
*/
package org.apache.jetspeed.om.common.entity;
-
import java.util.Locale;
import org.apache.pluto.om.portlet.PortletDefinition;
import org.apache.pluto.om.entity.PortletEntity;
-import org.apache.pluto.om.entity.PortletEntityCtrl;
import org.apache.pluto.om.entity.PortletApplicationEntity;
import org.apache.pluto.om.window.PortletWindowList;
import org.apache.pluto.om.common.Description;
@@ -67,42 +65,35 @@
import org.apache.pluto.util.StringUtils;
import org.apache.jetspeed.om.common.preference.PreferenceSetComposite;
-import org.apache.jetspeed.om.common.preference.UserPreferencesImpl;
+import org.apache.jetspeed.om.common.preference.PreferenceSetImpl;
+
import org.apache.jetspeed.om.common.window.PortletWindowListImpl;
+
+import org.apache.jetspeed.util.ArgUtil;
import org.apache.jetspeed.util.JetspeedObjectID;
/**
* Portlet Entity default implementation.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id$
*/
-public class PortletEntityImpl implements PortletEntity, PortletEntityCtrl,
java.io.Serializable
+public class PortletEntityImpl implements InitablePortletEntity
{
private JetspeedObjectID oid;
- protected UserPreferencesImpl preferences;
-
- private UserPreferencesImpl workingPreferences;
+ protected PreferenceSetComposite preferences;
private PortletApplicationEntity applicationEntity = null;
private PortletWindowList portletWindows = new PortletWindowListImpl();
-
private PortletEntity modifiedObject = null;
private PortletDefinition portletDefinition = null;
- public PortletEntityImpl(PortletDefinition pd, String instanceName)
- {
- this.portletDefinition = pd;
- // TODO: Get UserPreferences from a service
- preferences = new UserPreferencesImpl((PreferenceSetComposite)
portletDefinition.getPreferenceSet());
- oid = JetspeedObjectID.createFromString(pd.getName() + ":" +
pd.getId().toString() + ":" + instanceName);
- }
-
public ObjectID getId()
{
return oid;
@@ -185,5 +176,22 @@
{
return portletDefinition.getDescription(arg0);
}
+
+ /**
+ * @see
org.apache.jetspeed.om.common.entity.ServiceablePortletEntity#init(org.apache.pluto.om.portlet.PortletDefinition,
java.lang.String)
+ */
+ public void init(PortletDefinition portletDefinition, String instanceName)
+ {
+ ArgUtil.notNull(
+ new Object[] { portletDefinition, instanceName },
+ new String[] { "portletDefinition", "instanceName" },
+ "init()");
+
+ this.portletDefinition = portletDefinition;
+ oid = JetspeedObjectID.createPortletEntityId(portletDefinition,
instanceName);
+ preferences = new PreferenceSetImpl();
+ }
+
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]