You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/10/27 04:15:52 UTC
svn commit: r708079 [2/3] - in
/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade:
components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/
components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/
components/j...
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LanguageImpl.java
------------------------------------------------------------------------------
cvs2svn:cvs-rev = 1.13
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LanguageImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LanguageImpl.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java?rev=708079&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java Sun Oct 26 20:15:51 2008
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.om.portlet.impl;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.pluto.om.portlet.Description;
+import org.apache.pluto.om.portlet.DisplayName;
+import org.apache.pluto.om.portlet.Listener;
+
+/**
+ * @version $Id$
+ *
+ */
+public class ListenerImpl implements Listener, Serializable
+{
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#addDescription(java.lang.String)
+ */
+ public Description addDescription(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#addDisplayName(java.lang.String)
+ */
+ public DisplayName addDisplayName(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#getDescription(java.util.Locale)
+ */
+ public Description getDescription(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#getDescriptions()
+ */
+ public List<? extends Description> getDescriptions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#getDisplayName(java.util.Locale)
+ */
+ public DisplayName getDisplayName(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#getDisplayNames()
+ */
+ public List<? extends DisplayName> getDisplayNames()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Listener#getListenerClass()
+ */
+ public String getListenerClass()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java (from r708032, portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/LocalizedFieldImpl.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java?p2=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java&p1=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/LocalizedFieldImpl.java&r1=708032&r2=708079&rev=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/LocalizedFieldImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java Sun Oct 26 20:15:51 2008
@@ -14,13 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.jetspeed.om.impl;
+package org.apache.jetspeed.om.portlet.impl;
import java.util.Locale;
import org.apache.jetspeed.om.portlet.LocalizedField;
import org.apache.jetspeed.util.HashCodeBuilder;
-import org.apache.jetspeed.util.JetspeedLongObjectID;
-import org.apache.pluto.om.portlet.ObjectID;
/**
* LocalizedFieldImpl
@@ -37,9 +35,6 @@
protected String name;
protected Locale locale;
- protected long parentId;
- protected JetspeedLongObjectID id;
-
public LocalizedFieldImpl()
{
@@ -83,14 +78,6 @@
this.value = value;
}
- /**
- *
- */
- public ObjectID getId()
- {
- return id;
- }
-
public void setLanguage(String language)
{
if (language != null)
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java
------------------------------------------------------------------------------
cvs2svn:cvs-rev = 1.2
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/LocalizedFieldImpl.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java Sun Oct 26 20:15:51 2008
@@ -28,16 +28,24 @@
import javax.portlet.PortletMode;
import javax.portlet.WindowState;
+import javax.xml.namespace.QName;
import org.apache.jetspeed.JetspeedActions;
import org.apache.jetspeed.om.common.Support;
-import org.apache.jetspeed.om.impl.UserAttributeImpl;
+import org.apache.jetspeed.om.portlet.ContainerRuntimeOption;
import org.apache.jetspeed.om.portlet.CustomPortletMode;
import org.apache.jetspeed.om.portlet.CustomWindowState;
+import org.apache.jetspeed.om.portlet.EventDefinition;
+import org.apache.jetspeed.om.portlet.Filter;
+import org.apache.jetspeed.om.portlet.FilterMapping;
import org.apache.jetspeed.om.portlet.GenericMetadata;
import org.apache.jetspeed.om.portlet.JetspeedServiceReference;
+import org.apache.jetspeed.om.portlet.Listener;
import org.apache.jetspeed.om.portlet.PortletApplication;
import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.PublicRenderParameter;
+import org.apache.jetspeed.om.portlet.SecurityConstraint;
+import org.apache.jetspeed.om.portlet.UserAttribute;
import org.apache.jetspeed.om.portlet.UserAttributeRef;
import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
@@ -90,8 +98,8 @@
private transient Map supportedCustomStates;
private transient Map mappedCustomModes;
private transient Map mappedCustomStates;
- private transient Collection supportedPortletModes;
- private transient Collection supportedWindowStates;
+ private transient List<PortletMode> supportedPortletModes;
+ private transient List<WindowState> supportedWindowStates;
/** Creates a new instance of BaseApplication */
public PortletApplicationDefinitionImpl()
@@ -99,8 +107,8 @@
portlets = new ArrayList<PortletDefinition>();
userAttributes = new ArrayList();
userAttributeRefs = new ArrayList();
- customPortletModes = new ArrayList();
- customWindowStates = new ArrayList();
+ customPortletModes = new ArrayList<PortletMode>();
+ customWindowStates = new ArrayList<WindowState>();
}
/**
@@ -155,32 +163,6 @@
return null;
}
- public ElementFactoryList<PortletDefinition> getPortlets()
- {
- if (portlets == null || !(portlets instanceof ElementFactoryList))
- {
- ElementFactoryList<PortletDefinition> lf =
- new ElementFactoryList<PortletDefinition>( new ElementFactoryList.Factory<PortletDefinition>()
- {
- public Class<? extends PortletDefinition> getElementClass()
- {
- return PortletDefinitionImpl.class;
- }
-
- public PortletDefinition newElement()
- {
- return new PortletDefinitionImpl();
- }
- });
- if (portlets != null)
- {
- lf.addAll(portlets);
- }
- portlets = lf;
- }
- return (ElementFactoryList<PortletDefinition>)portlets;
- }
-
/**
* @return
*/
@@ -206,17 +188,6 @@
}
- /**
- * @see org.apache.jetspeed.om.portlet.PortletApplication#addUserAttribute(java.lang.String, java.lang.String)
- */
- public void addUserAttribute(String userName, String description)
- {
- UserAttributeImpl userAttribute = new UserAttributeImpl();
- userAttribute.setName(userName);
- userAttribute.setDescription(description);
- userAttributes.add(userAttribute);
- }
-
/**
* @see org.apache.jetspeed.om.portlet.PortletApplication#setApplicationType(int)
*/
@@ -344,7 +315,7 @@
return null;
}
- public Collection getSupportedPortletModes()
+ public List<PortletMode> getSupportedPortletModes()
{
if ( supportedPortletModes == null )
{
@@ -366,12 +337,12 @@
}
}
}
- supportedPortletModes = Collections.unmodifiableCollection(list);
+ supportedPortletModes = Collections.unmodifiableList(list);
}
return supportedPortletModes;
}
- public Collection getCustomWindowStates()
+ public List<CustomWindowState> getCustomWindowStates()
{
return customWindowStates;
}
@@ -432,7 +403,7 @@
return null;
}
- public Collection getSupportedWindowStates()
+ public List<WindowState> getSupportedWindowStates()
{
if ( supportedWindowStates == null )
{
@@ -454,7 +425,7 @@
}
}
}
- supportedWindowStates = Collections.unmodifiableCollection(list);
+ supportedWindowStates = Collections.unmodifiableList(list);
}
return supportedWindowStates;
}
@@ -490,4 +461,226 @@
}
return false;
}
+
+ public ContainerRuntimeOption addContainerRuntimeOption(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public CustomPortletMode addCustomPortletMode(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public CustomWindowState addCustomWindowState(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinition addEventDefinition(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinition addEventDefinition(QName qname)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Filter addFilter(String filterName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FilterMapping addFilterMapping(String filterName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addJetspeedServiceReference(String name)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Listener addListener(String listenerClass)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PortletDefinition addPortlet(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PublicRenderParameter addPublicRenderParameter(String name, String identifier)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PublicRenderParameter addPublicRenderParameter(QName qname, String identifier)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SecurityConstraint addSecurityConstraint(String transportGuarantee)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public UserAttribute addUserAttribute(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public UserAttributeRef addUserAttributeRef(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ContainerRuntimeOption getContainerRuntimeOption(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ContainerRuntimeOption> getContainerRuntimeOptions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public CustomPortletMode getCustomPortletMode(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public CustomWindowState getCustomWindowState(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<EventDefinition> getEventDefinitions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Filter getFilter(String filterName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FilterMapping getFilterMapping(String filterName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<FilterMapping> getFilterMappings()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Filter> getFilters()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Listener> getListeners()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<PortletDefinition> getPortlets()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PublicRenderParameter getPublicRenderParameter(String identifier)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<PublicRenderParameter> getPublicRenderParameters()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<SecurityConstraint> getSecurityConstraints()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public UserAttribute getUserAttribute(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public UserAttributeRef getUserAttributeRef(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<UserAttributeRef> getUserAttributeRefs()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<UserAttribute> getUserAttributes()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getDefaultNamespace()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getResourceBundle()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setDefaultNamespace(String defaultNamespace)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setResourceBundle(String resourceBundle)
+ {
+ // TODO Auto-generated method stub
+
+ }
}
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationLocalizedFieldImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationLocalizedFieldImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationLocalizedFieldImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationLocalizedFieldImpl.java Sun Oct 26 20:15:51 2008
@@ -16,7 +16,6 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import org.apache.jetspeed.om.impl.LocalizedFieldImpl;
/**
*
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationMetadataImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationMetadataImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationMetadataImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationMetadataImpl.java Sun Oct 26 20:15:51 2008
@@ -18,7 +18,6 @@
import java.util.Locale;
-import org.apache.jetspeed.om.impl.GenericMetadataImpl;
import org.apache.jetspeed.om.portlet.LocalizedField;
/**
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java Sun Oct 26 20:15:51 2008
@@ -22,39 +22,35 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.portlet.PreferencesValidator;
+import javax.xml.namespace.QName;
import org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider;
import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.components.portletregistry.RegistryException;
import org.apache.jetspeed.factory.PortletFactory;
import org.apache.jetspeed.om.common.Support;
-import org.apache.jetspeed.om.common.preference.PreferenceComposite;
-import org.apache.jetspeed.om.common.preference.PreferenceSetComposite;
-import org.apache.jetspeed.om.common.preference.PreferencesValidatorFactory;
-import org.apache.jetspeed.om.impl.DescriptionImpl;
-import org.apache.jetspeed.om.impl.DescriptionSetImpl;
-import org.apache.jetspeed.om.impl.DisplayNameSetImpl;
-import org.apache.jetspeed.om.impl.LanguageImpl;
-import org.apache.jetspeed.om.impl.ParameterSetImpl;
-import org.apache.jetspeed.om.impl.PortletDescriptionImpl;
-import org.apache.jetspeed.om.impl.PortletDisplayNameImpl;
-import org.apache.jetspeed.om.impl.PortletParameterSetImpl;
-import org.apache.jetspeed.om.impl.SecurityRoleRefImpl;
-import org.apache.jetspeed.om.impl.SecurityRoleRefSetImpl;
+import org.apache.jetspeed.om.portlet.ContainerRuntimeOption;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.om.portlet.DisplayName;
+import org.apache.jetspeed.om.portlet.EventDefinitionReference;
import org.apache.jetspeed.om.portlet.GenericMetadata;
import org.apache.jetspeed.om.portlet.InitParam;
import org.apache.jetspeed.om.portlet.PortletApplication;
import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.PortletInfo;
+import org.apache.jetspeed.om.portlet.Preferences;
+import org.apache.jetspeed.om.portlet.SecurityRoleRef;
+import org.apache.jetspeed.om.portlet.Supports;
import org.apache.jetspeed.util.HashCodeBuilder;
import org.apache.jetspeed.util.JetspeedLocale;
import org.apache.jetspeed.util.JetspeedLongObjectID;
@@ -62,20 +58,6 @@
import org.apache.ojb.broker.PersistenceBrokerAware;
import org.apache.ojb.broker.PersistenceBrokerException;
import org.apache.jetspeed.om.portlet.Language;
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Parameter;
-import org.apache.pluto.om.portlet.ParameterSet;
-import org.apache.pluto.om.portlet.Preference;
-import org.apache.pluto.om.portlet.PreferenceSet;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.DescriptionSet;
-import org.apache.pluto.om.portlet.DisplayName;
-import org.apache.pluto.om.portlet.DisplayNameSet;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.om.portlet.SecurityRoleRef;
-import org.apache.pluto.om.portlet.SecurityRoleRefSet;
-import org.apache.pluto.om.portlet.Supports;
-import org.apache.pluto.om.servlet.ServletDefinition;
/**
*
@@ -85,66 +67,36 @@
* @version $Id$
*
*/
-public class PortletDefinitionImpl implements PortletDefinition, PreferencesValidatorFactory, Serializable, Support, PersistenceBrokerAware
+public class PortletDefinitionImpl implements PortletDefinition, Serializable, Support, PersistenceBrokerAware
{
private static PortletRegistry registry;
private static PortletFactory portletFactory;
private static PortletPreferencesProvider portletPreferencesProvider;
+
+ private PortletApplication application;
private Long id;
- private JetspeedLongObjectID oid;
- private String className;
- private String name;
- private String portletIdentifier;
- private List<Language> languages = null;
- private Collection parameterSet;
- private ParameterSetImpl paramListWrapper = new PortletParameterSetImpl();
- private Collection securityRoleRefSet;
- private SecurityRoleRefSetImpl secListWrapper = new SecurityRoleRefSetImpl();
- /** User attribute set. * */
- //private Collection userAttributeSet;
- /** User attribute ref set. * */
- //private Collection userAttributeRefSet;
- private String preferenceValidatorClassname;
- private Collection displayNames;
- private DisplayNameSetImpl DNListWrapper = new DisplayNameSetImpl();
- private Collection descriptions;
- private DescriptionSetImpl descListWrapper = new DescriptionSetImpl(DescriptionImpl.TYPE_PORTLET);
- private String resourceBundle;
- private ArrayList supportedLocales;
- private List<Supports> supports;
+ protected String portletName;
+ protected String portletClass;
+ protected String resourceBundle;
+ protected String preferenceValidatorClassname;
+
+ private List<Language> languages = null;
+ private Map<Locale,ResourceBundle> resourceBundles = new HashMap<Locale, ResourceBundle>();
+
protected List portletEntities;
/** PortletApplicationDefinition this PortletDefinition belongs to */
private PortletApplication app;
- protected long appId;
- private String expirationCache;
-
- /** Metadata property */
+ /** Metadata property */
private Collection metadataFields = null;
- private PreferenceSetComposite preferenceSet;
private String jetspeedSecurityConstraint = null;
public PortletDefinitionImpl()
{
- super();
- try
- {
- parameterSet = new ArrayList();
- securityRoleRefSet = new ArrayList();
- //userAttributeSet = new ArrayList();
- //userAttributeRefSet = new ArrayList();
- contentTypes = new ArrayList();
- supportedLocales= new ArrayList();
- }
- catch (RuntimeException e)
- {
-// System.out.println("Failed to fully construct Portlet Definition");
- e.printStackTrace();
- }
}
protected ResourceBundle loadResourceBundle( Locale locale )
@@ -154,9 +106,10 @@
{
if (getResourceBundle() != null)
{
- if (getPortletClassLoader() != null)
+ ClassLoader cl = getPortletClassLoader();
+ if (cl != null)
{
- resourceBundle = ResourceBundle.getBundle(getResourceBundle(), locale, getPortletClassLoader());
+ resourceBundle = ResourceBundle.getBundle(getResourceBundle(), locale, cl);
}
else
{
@@ -177,7 +130,7 @@
*/
public String getPortletClass()
{
- return className;
+ return portletClass;
}
/**
@@ -185,67 +138,12 @@
*/
public String getPortletName()
{
- return name;
+ return portletName;
}
public Language getLanguage(Locale locale)
{
- LanguageImpl fallback = null;
- // ensure languages list is available;
- getLanguages();
- synchronized (languages)
- {
- for (Language l : languages)
- {
- LanguageImpl lang = (LanguageImpl)l;
- if (lang.getLocale().equals(locale))
- {
- if (getResourceBundle() != null && lang.getParentResourceBundle() == null)
- {
- lang.setResourceBundle(loadResourceBundle(lang.getLocale()));
- }
- return lang;
- }
- else if (lang.getLocale().getLanguage().equals(locale.getLanguage()))
- {
- fallback = lang;
- }
- }
- if ( fallback == null )
- {
- if ( JetspeedLocale.getDefaultLocale().equals(locale) )
- {
- // no default language stored yet
- LanguageImpl defaultLanguage = new LanguageImpl();
- defaultLanguage.setLocale(locale);
-
- if ( getResourceBundle() != null )
- {
- defaultLanguage.setResourceBundle(loadResourceBundle(locale));
- defaultLanguage.loadDefaults();
- languages.add(defaultLanguage);
- return defaultLanguage;
- }
- }
- else
- {
- return getLanguage(JetspeedLocale.getDefaultLocale());
- }
- }
-
- LanguageImpl language = new LanguageImpl();
- language.setLocale(locale);
- language.setTitle(fallback.getTitle());
- language.setShortTitle(fallback.getShortTitle());
- language.setKeywords(fallback.getKeywords());
- if ( getResourceBundle() != null )
- {
- language.setResourceBundle(loadResourceBundle(locale));
- }
- language.loadDefaults();
- languages.add(language);
- return language;
- }
+ return null;
}
public List<Language> getLanguages()
@@ -256,147 +154,30 @@
}
return Collections.unmodifiableList(languages);
}
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addLanguage(java.lang.String, java.lang.String, java.lang.String, java.util.Locale)
- */
- public void addLanguage(String title, String shortTitle, String keywords, Locale locale)
- {
- // ensure list is available
- getLanguages();
- synchronized(languages)
- {
- if (locale == null)
- {
- locale = JetspeedLocale.getDefaultLocale();
- }
- LanguageImpl lang = (LanguageImpl)getLanguage(locale);
- boolean newLang = lang == null;
- if (newLang)
- {
- lang = new LanguageImpl();
- lang.setLocale(locale);
- }
- lang.setTitle(title);
- lang.setShortTitle(shortTitle);
- lang.setKeywords(keywords);
- if (newLang)
- {
- if ( getResourceBundle() != null )
- {
- lang.setResourceBundle(loadResourceBundle(locale));
- lang.loadDefaults();
- languages.add(lang);
- }
- }
- }
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getInitParameterSet()
- */
- public ParameterSet getInitParameterSet()
- {
- paramListWrapper.setInnerCollection(parameterSet);
- return paramListWrapper;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getInitSecurityRoleRefSet()
- */
- public SecurityRoleRefSet getInitSecurityRoleRefSet()
- {
- secListWrapper.setInnerCollection(securityRoleRefSet);
- return secListWrapper;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getPreferenceSet()
- */
- public PreferenceSet getPreferenceSet()
- {
- if (preferenceSet == null)
- {
-
- if(app == null)
- {
- throw new IllegalStateException("Portlet Application must be defined before preferences can be accessed");
- }
- preferenceSet = portletPreferencesProvider.getPreferenceSet(this);
- }
- return preferenceSet;
- }
-
- /**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinition#setPreferenceSet(org.apache.pluto.om.common.PreferenceSet)
- */
- public void setPreferenceSet( PreferenceSet preferences )
- {
- this.preferenceSet = (PreferenceSetComposite) preferences;
- }
-
- public Supports getSupports(String mimeType)
+ public Language addLanguage(Locale locale)
{
- for (Supports s : getSupports())
+ for (Language l : languages)
{
- if (s.getMimeType().equals(mimeType))
+ if (l.getLocale().equals(locale))
{
- return s;
+ throw new IllegalArgumentException("Language already defined");
}
}
- return null;
+ LanguageImpl l = new LanguageImpl();
+ l.setLocale(locale);
+ languages.add(l);
+ return l;
}
- public ElementFactoryList<Supports> getSupports()
- {
- if (supports == null || !(supports instanceof ElementFactoryList))
- {
- ElementFactoryList<Supports> lf =
- new ElementFactoryList<Supports>( new ElementFactoryList.Factory<Supports>()
- {
- public Class<? extends Supports> getElementClass()
- {
- return SupportsImpl.class;
- }
-
- public Supports newElement()
- {
- return new SupportsImpl();
- }
- });
- if (supports != null)
- {
- lf.addAll(supports);
- }
- supports = lf;
- }
- return (ElementFactoryList<Supports>)supports;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getPortletApplicationDefinition()
- */
- public PortletApplicationDefinition getPortletApplicationDefinition()
- {
- return app;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getServletDefinition()
- */
- public ServletDefinition getServletDefinition()
+ public ResourceBundle getResourceBundle(Locale locale)
{
- // TODO Auto-generated method stub
return null;
}
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getExpirationCache()
- */
- public String getExpirationCache()
+ public PortletApplication getPortletApplicationDefinition()
{
- return expirationCache;
+ return app;
}
/**
@@ -408,166 +189,16 @@
}
/**
- * @see org.apache.pluto.om.portlet.PortletDefinition#setId(java.lang.String)
- */
- public void setId( String oid )
- {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#setPortletClass(java.lang.String)
- */
- public void setPortletClass( String className )
- {
- this.className = className;
- }
-
- /**
* @see org.apache.pluto.om.portlet.PortletDefinition#setPortletName(java.lang.String)
*/
public void setPortletName( String name )
{
- this.name = name;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#setPortletClassLoader(java.lang.ClassLoader)
- */
- public void setPortletClassLoader( ClassLoader loader )
- {
- // no-op: ClassLoader is only stored in the PortletFactory
- ;
- }
-
- /**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinition#setInitParameterSet(org.apache.pluto.om.common.ParameterSet)
- */
- public void setInitParameterSet( ParameterSet parameters )
- {
- this.parameterSet = ((ParameterSetImpl) parameters).getInnerCollection();
- }
-
- /**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinition#setInitSecurityRoleRefSet(org.apache.pluto.om.common.SecurityRoleRefSet)
- */
- public void setInitSecurityRoleRefSet( SecurityRoleRefSet securityRefs )
- {
- this.securityRoleRefSet = ((SecurityRoleRefSetImpl) securityRefs).getInnerCollection();
- }
-
- /**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#addUserAttribute(org.apache.jetspeed.om.common.UserAttribute)
- */
- /*
- * public void addUserAttribute(UserAttribute userAttribute) {
- * this.userAttributeSet.add(userAttribute); }
- *
- *//**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#setUserAttributeSet(java.util.Collection)
- */
- /*
- * public void setUserAttributeSet(Collection userAttributeSet) {
- * this.userAttributeSet = userAttributeSet; }
- *
- *//**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#getUserAttributeSet()
- */
- /*
- * public Collection getUserAttributeSet() { return this.userAttributeSet; }
- *
- *//**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#addUserAttributeRef(org.apache.jetspeed.om.common.UserAttributeRef)
- */
- /*
- * public void addUserAttributeRef(UserAttributeRef userAttributeRef) {
- * System.out.println("_______IN addUserAttributeRef");
- * this.userAttributeRefSet.add(userAttributeRef); }
- *
- *//**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#setUserAttributeSet(java.util.Collection)
- */
- /*
- * public void setUserAttributeRefSet(Collection userAttributeRefSet) {
- * this.userAttributeRefSet = userAttributeRefSet; }
- *
- *//**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite#getUserAttributeRefSet()
- */
- /*
- * public Collection getUserAttributeRefSet() { return
- * this.userAttributeRefSet; }
- */
- /**
- * @see org.apache.jetspeed.om.common.portlet.PortletDefinition#setInitParameter(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public InitParam addInitParameter( String name, String value, DescriptionSet description )
- {
- InitParam pc = addInitParameter(name, value);
- pc.setDescriptionSet(description);
- return pc;
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addInitParameter(java.lang.String,
- * java.lang.String, java.lang.String, java.util.Locale)
- */
- public InitParam addInitParameter( String name, String value, String description, Locale locale )
- {
- InitParam param = addInitParameter(name, value);
- param.addDescription(locale, description);
- return param;
- }
-
- public void addInitParameter( Parameter parameter )
- {
- parameterSet.add(parameter);
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#setInitParameter(java.lang.String,
- * java.lang.String)
- */
- public InitParam addInitParameter( String name, String value )
- {
- paramListWrapper.setInnerCollection(parameterSet);
- return (InitParam) paramListWrapper.add(name, value);
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#setExpirationCache(java.lang.String)
- */
- public void setExpirationCache( String cache )
- {
- expirationCache = cache;
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addPreference(java.lang.String,
- * java.util.Collection)
- */
- public PreferenceComposite addPreference( String name, String[] values )
- {
- return (PreferenceComposite) ((PreferenceSetComposite) getPreferenceSet()).add(name, Arrays.asList(values));
+ this.portletName = name;
}
- public void setPortletIdentifier( String portletIdentifier )
+ public void setPortletApplication( PortletApplication pa )
{
- this.portletIdentifier = portletIdentifier;
- }
-
- public String getPortletIdentifier()
- {
- return this.portletIdentifier;
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#setPortletApplicationDefinition(org.apache.pluto.om.portlet.PortletApplicationDefinition)
- */
- public void setPortletApplicationDefinition( PortletApplicationDefinition pad )
- {
- app = (PortletApplication) pad;
+ app = (PortletApplication) pa;
}
/**
@@ -583,9 +214,9 @@
{
return true;
}
- boolean sameAppId = (appId == pd.appId);
- boolean sameName = (pd.getPortletName() != null && name != null && pd.getPortletName().equals(name));
- return sameName && sameAppId;
+// boolean sameAppId = (appId == pd.appId);
+ boolean sameName = (pd.getPortletName() != null && portletName != null && pd.getPortletName().equals(portletName));
+ return sameName;// && sameAppId;
}
return false;
}
@@ -596,13 +227,13 @@
public int hashCode()
{
HashCodeBuilder hasher = new HashCodeBuilder(1, 3);
- hasher.append(name);
+ hasher.append(portletName);
if (app != null)
{
- if ( getId() != null )
- {
- hasher.append(getId().toString());
- }
+// if ( getId() != null )
+// {
+// hasher.append(getId().toString());
+// }
hasher.append(app.getName());
}
return hasher.toHashCode();
@@ -613,9 +244,9 @@
*/
public String getUniqueName()
{
- if (app != null && name != null)
+ if (app != null && portletName != null)
{
- return app.getName() + "::" + name;
+ return app.getName() + "::" + portletName;
}
else
{
@@ -625,66 +256,6 @@
}
/**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getDescription(java.util.Locale)
- */
- public Description getDescription( Locale arg0 )
- {
- if (descriptions != null)
- {
- descListWrapper.setInnerCollection(descriptions);
- return descListWrapper.get(arg0);
- }
- return null;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#getDisplayName(java.util.Locale)
- */
- public DisplayName getDisplayName( Locale arg0 )
- {
- if (displayNames != null)
- {
- DNListWrapper.setInnerCollection(displayNames);
- return DNListWrapper.get(arg0);
- }
- return null;
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#setDescriptions(org.apache.pluto.om.common.DescriptionSet)
- */
- public void setDescriptions( DescriptionSet arg0 )
- {
- this.descriptions = ((DescriptionSetImpl) arg0).getInnerCollection();
- }
-
- /**
- * @see org.apache.pluto.om.portlet.PortletDefinition#setDisplayNames(org.apache.pluto.om.common.DisplayNameSet)
- */
- public void setDisplayNames( DisplayNameSet arg0 )
- {
- this.displayNames = ((DisplayNameSetImpl) arg0).getInnerCollection();
- }
-
- /**
- * Returns localized text of this PortletDefinitions display name.
- *
- * @param locale
- * Locale to get the display name for
- * @return Localized text string of the display name or <code>null</code>
- * if no DisplayName exists for this locale
- */
- public String getDisplayNameText( Locale locale )
- {
- DisplayName dn = getDisplayName(locale);
- if (dn != null)
- {
- return dn.getDisplayName();
- }
- return null;
- }
-
- /**
* Returns localized text of this PortletDefinitions description.
*
* @param locale
@@ -702,74 +273,6 @@
return null;
}
- public DescriptionSet getDescriptionSet()
- {
- return this.descListWrapper;
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addDescription(java.util.Locale,
- * java.lang.String)
- */
- public void addDescription( Locale locale, String description )
- {
- if (descriptions == null)
- {
- descriptions = new ArrayList();
- }
- descListWrapper.setInnerCollection(descriptions);
- Description descObj = new PortletDescriptionImpl();
- descObj.setLocale(locale);
- descObj.setDescription(description);
- descListWrapper.addDescription(descObj);
- }
-
- public void addDescription( Description description )
- {
- if (descriptions == null)
- {
- descriptions = new ArrayList();
- }
- descListWrapper.setInnerCollection(descriptions);
- descListWrapper.addDescription(description);
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addDisplayName(java.util.Locale,
- * java.lang.String)
- */
- public void addDisplayName( Locale locale, String displayName )
- {
- if (displayNames == null)
- {
- displayNames = new ArrayList();
- }
- DNListWrapper.setInnerCollection(displayNames);
- DisplayName dn = new PortletDisplayNameImpl();
- dn.setLocale(locale);
- dn.setDisplayName(displayName);
- DNListWrapper.addDisplayName(dn);
- }
-
- public void addDisplayName( DisplayName displayName )
- {
- if (displayNames == null)
- {
- displayNames = new ArrayList();
- }
- DNListWrapper.setInnerCollection(displayNames);
- DNListWrapper.addDisplayName(displayName);
- }
-
- public DisplayNameSet getDisplayNameSet()
- {
- if ( displayNames != null )
- {
- DNListWrapper.setInnerCollection(displayNames);
- }
- return DNListWrapper;
- }
-
/**
* <p>
* store will attempt to perform an atomic persistence call against this
@@ -794,10 +297,10 @@
public void storeChildren()
{
- if (preferenceSet != null)
- {
- portletPreferencesProvider.savePreferenceSet(this, preferenceSet);
- }
+// if (preferenceSet != null)
+// {
+// portletPreferencesProvider.savePreferenceSet(this, preferenceSet);
+// }
}
/**
@@ -826,56 +329,6 @@
}
/**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addPreference(org.apache.pluto.om.common.Preference)
- * @param preference
- */
- public void addPreference( Preference preference )
- {
- Iterator valueItr = preference.getValues();
- ArrayList list = new ArrayList();
- while (valueItr.hasNext())
- {
- list.add(valueItr.next());
- }
-
- PreferenceComposite newPref = (PreferenceComposite) ((PreferenceSetComposite) getPreferenceSet()).add(
- preference.getName(), list);
- newPref.setReadOnly(Boolean.toString(preference.isReadOnly()));
-
- // TODO: remove? (not really used/implemented in Jetspeed)
- Iterator descItr = newPref.getDescriptions();
- while (descItr.hasNext())
- {
- Description desc = (Description) descItr.next();
- newPref.addDescription(desc.getLocale(), desc.getDescription());
- }
-
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addSecurityRoleRef(org.apache.pluto.om.portlet.SecurityRoleRef)
- */
- public void addSecurityRoleRef( SecurityRoleRef securityRef )
- {
- secListWrapper.setInnerCollection(securityRoleRefSet);
- secListWrapper.add(securityRef);
- }
-
- /**
- * @see org.apache.jetspeed.om.portlet.PortletDefinition#addSecurityRoleRef(java.lang.String, java.lang.String)
- */
- public SecurityRoleRef addSecurityRoleRef(String roleName, String roleLink)
- {
- SecurityRoleRefImpl ref = new SecurityRoleRefImpl();
- ref.setRoleName(roleName);
- ref.setRoleLink(roleLink);
-
- addSecurityRoleRef(ref);
-
- return ref;
- }
-
- /**
* @see org.apache.jetspeed.om.portlet.PortletApplication#getMetadata()
*/
public GenericMetadata getMetadata()
@@ -931,30 +384,6 @@
resourceBundle = string;
}
- public Collection getSupportedLocales()
- {
- return supportedLocales;
- }
-
- public void addSupportedLocale(String locale)
- {
- // parse locale String
- StringTokenizer tokenizer = new StringTokenizer(locale, "_");
- String[] localeDef = new String[3];
- for (int i = 0; i < 3; i++)
- {
- if (tokenizer.hasMoreTokens())
- {
- localeDef[i] = tokenizer.nextToken();
- }
- else
- {
- localeDef[i] = "";
- }
- }
- supportedLocales.add(new Locale(localeDef[0], localeDef[1], localeDef[2]));
- }
-
/* (non-Javadoc)
* @see org.apache.jetspeed.om.Support#postLoad(java.lang.Object)
*/
@@ -1030,4 +459,232 @@
{
PortletDefinitionImpl.portletPreferencesProvider = portletPreferencesProvider;
}
+
+ public ContainerRuntimeOption addContainerRuntimeOption(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Description addDescription(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DisplayName addDisplayName(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public InitParam addInitParam(String paramName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SecurityRoleRef addSecurityRoleRef(String roleName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinitionReference addSupportedProcessingEvent(QName qname)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinitionReference addSupportedProcessingEvent(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinitionReference addSupportedPublishingEvent(QName qname)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EventDefinitionReference addSupportedPublishingEvent(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Supports addSupports(String mimeType)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PortletApplication getApplication()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ContainerRuntimeOption getContainerRuntimeOption(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ContainerRuntimeOption> getContainerRuntimeOptions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Description getDescription(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Description> getDescriptions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DisplayName getDisplayName(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getDisplayNameText(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<DisplayName> getDisplayNames()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public InitParam getInitParam(String paramName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<InitParam> getInitParams()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PortletInfo getPortletInfo()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Preferences getPortletPreferences()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SecurityRoleRef getSecurityRoleRef(String roleName)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<SecurityRoleRef> getSecurityRoleRefs()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<EventDefinitionReference> getSupportedProcessingEvents()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<EventDefinitionReference> getSupportedPublishingEvents()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Supports getSupports(String mimeType)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Supports> getSupports()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isSameIdentity(PortletDefinition other)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void addSupportedLocale(String lang)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addSupportedPublicRenderParameter(String identifier)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getCacheScope()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getExpirationCache()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public List<String> getSupportedLocales()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> getSupportedPublicRenderParameters()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setCacheScope(String cacheScope)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setExpirationCache(int expirationCache)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPortletClass(String portletClass)
+ {
+ // TODO Auto-generated method stub
+
+ }
}
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionLocalizedFieldImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionLocalizedFieldImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionLocalizedFieldImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionLocalizedFieldImpl.java Sun Oct 26 20:15:51 2008
@@ -16,7 +16,6 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import org.apache.jetspeed.om.impl.LocalizedFieldImpl;
/**
*
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionMetadataImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionMetadataImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionMetadataImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionMetadataImpl.java Sun Oct 26 20:15:51 2008
@@ -18,7 +18,6 @@
import java.util.Locale;
-import org.apache.jetspeed.om.impl.GenericMetadataImpl;
import org.apache.jetspeed.om.portlet.LocalizedField;
/**
Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java?rev=708079&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java Sun Oct 26 20:15:51 2008
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.om.portlet.impl;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.apache.jetspeed.om.portlet.Preference;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PreferenceImpl implements Preference, Serializable
+{
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preference#addValue(java.lang.String)
+ */
+ public void addValue(String value)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preference#getName()
+ */
+ public String getName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preference#getValues()
+ */
+ public List<String> getValues()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preference#isReadOnly()
+ */
+ public boolean isReadOnly()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preference#setReadOnly(boolean)
+ */
+ public void setReadOnly(boolean readOnly)
+ {
+ // TODO Auto-generated method stub
+ }
+}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferenceImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java?rev=708079&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java Sun Oct 26 20:15:51 2008
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.om.portlet.impl;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.apache.jetspeed.om.portlet.Preference;
+import org.apache.jetspeed.om.portlet.Preferences;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PreferencesImpl implements Preferences, Serializable
+{
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.Preferences#addPreference(java.lang.String)
+ */
+ public Preference addPreference(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.Preferences#getPortletPreference(java.lang.String)
+ */
+ public Preference getPortletPreference(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.Preferences#getPortletPreferences()
+ */
+ public List<Preference> getPortletPreferences()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preferences#getPreferencesValidator()
+ */
+ public String getPreferencesValidator()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.Preferences#setPreferencesValidator(java.lang.String)
+ */
+ public void setPreferencesValidator(String preferencesValidator)
+ {
+ // TODO Auto-generated method stub
+ }
+}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PreferencesImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java?rev=708079&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java Sun Oct 26 20:15:51 2008
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.om.portlet.impl;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.namespace.QName;
+
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.PublicRenderParameter;
+
+/**
+ * @version $Id$
+ *
+ */
+public class PublicRenderParameterImpl implements PublicRenderParameter, Serializable
+{
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.PublicRenderParameter#addDescription(java.lang.String)
+ */
+ public Description addDescription(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.PublicRenderParameter#getDescription(java.util.Locale)
+ */
+ public Description getDescription(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.PublicRenderParameter#getDescriptions()
+ */
+ public List<Description> getDescriptions()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PublicRenderParameter#addAlias(javax.xml.namespace.QName)
+ */
+ public void addAlias(QName alias)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PublicRenderParameter#getAliases()
+ */
+ public List<QName> getAliases()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PublicRenderParameter#getIdentifier()
+ */
+ public String getIdentifier()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PublicRenderParameter#getName()
+ */
+ public String getName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PublicRenderParameter#getQName()
+ */
+ public QName getQName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java?rev=708079&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java Sun Oct 26 20:15:51 2008
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.om.portlet.impl;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.portlet.DisplayName;
+import org.apache.jetspeed.om.portlet.SecurityConstraint;
+import org.apache.jetspeed.om.portlet.UserDataConstraint;
+
+/**
+ * @version $Id$
+ *
+ */
+public class SecurityConstraintImpl implements SecurityConstraint, Serializable
+{
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.SecurityConstraint#addDisplayName(java.lang.String)
+ */
+ public DisplayName addDisplayName(String lang)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.SecurityConstraint#getDisplayName(java.util.Locale)
+ */
+ public DisplayName getDisplayName(Locale locale)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.SecurityConstraint#getDisplayNames()
+ */
+ public List<DisplayName> getDisplayNames()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.om.portlet.SecurityConstraint#getUserDataConstraint()
+ */
+ public UserDataConstraint getUserDataConstraint()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.SecurityConstraint#addPortletName(java.lang.String)
+ */
+ public void addPortletName(String portletName)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.SecurityConstraint#getPortletNames()
+ */
+ public List<String> getPortletNames()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java (from r708032, portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/SecurityRoleRefImpl.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java?p2=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java&p1=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/SecurityRoleRefImpl.java&r1=708032&r2=708079&rev=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/impl/SecurityRoleRefImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java Sun Oct 26 20:15:51 2008
@@ -14,20 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.jetspeed.om.impl;
+package org.apache.jetspeed.om.portlet.impl;
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collection;
+import java.util.List;
import java.util.Locale;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.om.portlet.SecurityRoleRef;
import org.apache.jetspeed.util.HashCodeBuilder;
-import org.apache.jetspeed.util.JetspeedLocale;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.DescriptionSet;
-import org.apache.pluto.om.portlet.SecurityRoleRef;
/**
*
@@ -39,49 +35,30 @@
*/
public class SecurityRoleRefImpl implements SecurityRoleRef, Serializable
{
-
- protected long id;
- protected long portletId;
private String link;
private String name;
- private Collection descriptions;
- private DescriptionSetImpl descCollWrapper = new DescriptionSetImpl(DescriptionImpl.TYPE_SEC_ROLE_REF);
+ protected List<Description> descriptions;
- /**
- * @see org.apache.pluto.om.portlet.SecurityRoleRef#getRoleLink()
- */
public String getRoleLink()
{
return link;
}
- /**
- * @see org.apache.pluto.om.portlet.SecurityRoleRef#getRoleName()
- */
public String getRoleName()
{
return name;
}
- /**
- * @see org.apache.pluto.om.common.SecurityRoleRefCtrl#setRoleLink(java.lang.String)
- */
public void setRoleLink(String value)
{
this.link = value;
}
- /**
- * @see org.apache.pluto.om.common.SecurityRoleRefCtrl#setRoleName(java.lang.String)
- */
public void setRoleName(String name)
{
this.name = name;
}
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
public boolean equals(Object obj)
{
if (obj != null && obj instanceof SecurityRoleRef)
@@ -99,10 +76,6 @@
return false;
}
-
- /**
- * @see java.lang.Object#hashCode()
- */
public int hashCode()
{
@@ -111,79 +84,37 @@
return hasher.toHashCode();
}
- /**
- * @see org.apache.pluto.om.portlet.SecurityRoleRef#getDescription(java.util.Locale)
- */
- public Description getDescription(Locale arg0)
+ public Description getDescription(Locale locale)
{
- if (descriptions != null)
+ for (Description d : getDescriptions())
{
- descCollWrapper.setInnerCollection(descriptions);
- return descCollWrapper.get(arg0);
+ if (d.getLocale().equals(locale))
+ {
+ return d;
+ }
}
return null;
}
-
- /**
- * @see org.apache.jetspeed.om.portlet.SecurityRoleRef#addDescription(org.apache.pluto.om.portlet.Description)
- */
- public void addDescription(Description description)
+
+ public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList();
+ descriptions = new ArrayList<Description>();
}
- descCollWrapper.setInnerCollection(descriptions);
- descCollWrapper.addDescription(description);
+ return descriptions;
}
- /**
- * @see org.apache.jetspeed.om.common.MutableDescriptionSet#addDescription(java.util.Locale, java.lang.String)
- */
- public void addDescription(Locale locale, String description)
- {
- SecurityRoleRefDescriptionImpl descImpl = new SecurityRoleRefDescriptionImpl();
- descImpl.setDescription(description);
- descImpl.setLocale(locale);
-
- addDescription(descImpl);
- }
-
- /**
- * @see org.apache.jetspeed.om.common.SecurityRoleRef#setDescriptionSet(org.apache.pluto.om.common.DescriptionSet)
- */
- public void setDescriptionSet(DescriptionSet descriptions)
- {
- this.descriptions = ((DescriptionSetImpl) descriptions).getInnerCollection();
-
- }
-
- /**
- * We should be using one of the more locale-specific methods.
- *
- *
- * @see org.apache.pluto.om.common.SecurityRoleRefCtrl#setDescription(java.lang.String)
- * @param arg0
- */
- public void setDescription(String arg0)
- {
- Description descObj =new SecurityRoleRefDescriptionImpl();
-
-
- descObj.setLocale(JetspeedLocale.getDefaultLocale());
- descObj.setDescription(arg0);
- addDescription(descObj);
- }
-
- /**
- * @see org.apache.jetspeed.om.common.SecurityRoleRef#getDescriptionSet()
- */
- public DescriptionSet getDescriptionSet()
+ public Description addDescription(String lang)
{
- if (descriptions != null)
+ DescriptionImpl d = new DescriptionImpl();
+ d.setLang(lang);
+ if (getDescription(d.getLocale()) != null)
{
- descCollWrapper.setInnerCollection(descriptions);
- }
- return descCollWrapper;
+ throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+ }
+ getDescriptions();
+ descriptions.add(d);
+ return d;
}
}
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java
------------------------------------------------------------------------------
cvs2svn:cvs-rev = 1.4
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java?rev=708079&r1=708078&r2=708079&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java Sun Oct 26 20:15:51 2008
@@ -38,9 +38,6 @@
{
}
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
public boolean equals(Object obj)
{
if (obj != null && obj instanceof Supports)
@@ -50,9 +47,6 @@
return false;
}
- /**
- * @see java.lang.Object#hashCode()
- */
public int hashCode()
{
HashCodeBuilder hasher = new HashCodeBuilder(27, 87);
@@ -79,4 +73,24 @@
{
this.mimeType = mimeType;
}
+
+ public void addPortletMode(String portletMode)
+ {
+ portletMode = portletMode.toLowerCase();
+ if (portletModes.contains(portletMode))
+ {
+ throw new IllegalArgumentException("PortletMode "+portletMode+" already defined");
+ }
+ portletModes.add(portletMode);
+ }
+
+ public void addWindowState(String windowState)
+ {
+ windowState = windowState.toLowerCase();
+ if (windowStates.contains(windowState))
+ {
+ throw new IllegalArgumentException("WindowState "+windowState+" already defined");
+ }
+ windowStates.add(windowState);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org