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 rw...@apache.org on 2009/06/18 07:11:12 UTC
svn commit: r785910 - in /portals/jetspeed-2/portal/trunk/components:
jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/
jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/
jetspeed-page-manager/src/main/java/...
Author: rwatler
Date: Thu Jun 18 05:11:11 2009
New Revision: 785910
URL: http://svn.apache.org/viewvc?rev=785910&view=rev
Log:
JS2-1015: correct registry handling of persistent collections by making them removal aware as has been done with DBPM
Added:
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java
portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java
portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/DatabasePreference.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterMappingImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InitParamImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeRefImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserDataConstraintImpl.java
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyMap.java Thu Jun 18 05:11:11 2009
@@ -18,13 +18,12 @@
import java.util.AbstractMap;
import java.util.AbstractSet;
+import java.util.HashSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
/**
* FragmentPropertyMap
*
@@ -85,7 +84,7 @@
private class FragmentPropertiesEntrySet extends AbstractSet
{
- private Collection entries = DatabasePageManagerUtils.createCollection();
+ private Set entries = new HashSet();
/* (non-Javadoc)
* @see java.util.Set#add(java.lang.Object)
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/impl/NodeImpl.java Thu Jun 18 05:11:11 2009
@@ -113,7 +113,7 @@
{
if (metadataFields == null)
{
- metadataFields = DatabasePageManagerUtils.createList();
+ metadataFields = DatabasePageManagerUtils.createCollection();
}
pageMetadata = newPageMetadata(metadataFields);
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerUtils.java Thu Jun 18 05:11:11 2009
@@ -21,9 +21,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
-import org.apache.ojb.broker.util.collections.RemovalAwareList;
-
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* DatabasePageManagerUtils
@@ -44,14 +42,28 @@
* @see JS2-590
* @return
*/
+
+ @SuppressWarnings("unchecked")
public static final Collection createCollection()
{
- return java.util.Collections.synchronizedCollection(new RemovalAwareCollection());
+ // return synchronized manageable/removal aware collection;
+ // requires setting collection-class attributes for collection-
+ // descriptor OJB mappings:
+ //
+ // <collection-descriptor ... collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection">
+ //
+ return CollectionUtils.createSynchronizedCollection();
}
+ @SuppressWarnings("unchecked")
public static final List createList()
{
- return java.util.Collections.synchronizedList(new RemovalAwareList());
- }
-
+ // return synchronized manageable/removal aware list;
+ // requires setting collection-class attributes for collection-
+ // descriptor OJB mappings:
+ //
+ // <collection-descriptor ... collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList">
+ //
+ return CollectionUtils.createSynchronizedList();
+ }
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml Thu Jun 18 05:11:11 2009
@@ -57,6 +57,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="folderId"/>
</collection-descriptor>
@@ -176,6 +177,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="folderId"/>
@@ -187,6 +189,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="folderId"/>
@@ -198,6 +201,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="sortOrder" sort="ASC"/>
<inverse-foreignkey field-ref="folderId"/>
@@ -209,6 +213,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="name" sort="ASC"/>
<inverse-foreignkey field-ref="folderId"/>
@@ -487,6 +492,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="menuId"/>
</collection-descriptor>
@@ -497,6 +503,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="elementOrder" sort="ASC"/>
<inverse-foreignkey field-ref="parentId"/>
@@ -717,6 +724,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="menuId"/>
</collection-descriptor>
@@ -801,6 +809,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<inverse-foreignkey field-ref="pageId"/>
</collection-descriptor>
@@ -811,6 +820,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="pageId"/>
</collection-descriptor>
@@ -930,6 +940,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="pageId"/>
@@ -941,6 +952,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="pageId"/>
@@ -952,6 +964,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="name" sort="ASC"/>
<inverse-foreignkey field-ref="pageId"/>
@@ -1199,6 +1212,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="menuId"/>
</collection-descriptor>
@@ -1209,6 +1223,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="elementOrder" sort="ASC"/>
<inverse-foreignkey field-ref="parentId"/>
@@ -1429,6 +1444,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="menuId"/>
</collection-descriptor>
@@ -1501,6 +1517,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="id" sort="ASC"/>
<inverse-foreignkey field-ref="parentId"/>
@@ -1645,6 +1662,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="fragmentId"/>
@@ -1656,6 +1674,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="fragmentId"/>
@@ -1667,6 +1686,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="name" sort="ASC"/>
<inverse-foreignkey field-ref="fragmentId"/>
@@ -1797,6 +1817,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<inverse-foreignkey field-ref="prefId"/>
</collection-descriptor>
@@ -1873,6 +1894,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
>
<inverse-foreignkey field-ref="pageId"/>
</collection-descriptor>
@@ -1992,6 +2014,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="pageId"/>
@@ -2003,6 +2026,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="pageId"/>
@@ -2241,6 +2265,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="name" sort="ASC"/>
<inverse-foreignkey field-ref="pageSecurityId"/>
@@ -2252,6 +2277,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="pageSecurityId"/>
@@ -2289,6 +2315,7 @@
auto-retrieve="true"
auto-delete="object"
auto-update="object"
+ collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
>
<orderby name="applyOrder" sort="ASC"/>
<inverse-foreignkey field-ref="constraintsDefId"/>
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/DatabasePreference.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/DatabasePreference.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/DatabasePreference.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/DatabasePreference.java Thu Jun 18 05:11:11 2009
@@ -16,9 +16,10 @@
*/
package org.apache.jetspeed.components.portletpreferences;
-import java.util.ArrayList;
import java.util.Collection;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
+
/**
* <p>
* The database representation of a preference object
@@ -117,11 +118,12 @@
return id;
}
+ @SuppressWarnings("unchecked")
public Collection<DatabasePreferenceValue> getPreferenceValues()
{
if (values == null)
{
- values = new ArrayList<DatabasePreferenceValue>();
+ values = CollectionUtils.createCollection();
}
return values;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java Thu Jun 18 05:11:11 2009
@@ -349,18 +349,17 @@
{
throw new FailedToStorePortletDefinitionException("Cannot clone to portlet named " + newPortletName + ", name already exists");
}
+
+ // create new portlet in source portlet application
+ PortletDefinition copy = source.getApplication().addPortlet(newPortletName);
- PortletDefinitionImpl copy = new PortletDefinitionImpl();
-
- // First set the name and display name
+ // First set display name
- copy.setPortletName(newPortletName);
DisplayName displayName = copy.addDisplayName(JetspeedLocale.getDefaultLocale().getLanguage());
displayName.setDisplayName(newPortletName);
// And, then, copy all attributes
- copy.setApplication(source.getApplication());
copy.setPortletClass(source.getPortletClass());
copy.setResourceBundle(source.getResourceBundle());
copy.setPreferenceValidatorClassname(source.getPreferenceValidatorClassname());
@@ -451,7 +450,6 @@
copy.getSupportedPublicRenderParameters().addAll(source.getSupportedPublicRenderParameters());
//savePortletDefinition(copy);
- source.getApplication().getPortlets().add(copy);
try
{
updatePortletApplication(source.getApplication());
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java Thu Jun 18 05:11:11 2009
@@ -23,6 +23,7 @@
import org.apache.jetspeed.om.portlet.ContainerRuntimeOption;
import org.apache.jetspeed.om.portlet.ContainerRuntimeOptionValue;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -53,12 +54,13 @@
{
this.name = name;
}
-
+
+ @SuppressWarnings("unchecked")
public void addValue(String value)
{
if (values == null)
{
- values = new ArrayList<ContainerRuntimeOptionValue>();
+ values = CollectionUtils.createList();
}
for (ContainerRuntimeOptionValue param : this.values)
{
@@ -70,11 +72,12 @@
values.add(new ContainerRuntimeOptionValueImpl(value));
}
+ @SuppressWarnings("unchecked")
public List<String> getValues()
{
if (values == null)
{
- values = new ArrayList<ContainerRuntimeOptionValue>();
+ values = CollectionUtils.createList();
}
List<String> vals = new ArrayList<String>();
for (ContainerRuntimeOptionValue v : this.values)
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java Thu Jun 18 05:11:11 2009
@@ -16,7 +16,6 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -25,6 +24,7 @@
import org.apache.jetspeed.om.portlet.CustomPortletMode;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
public class CustomPortletModeImpl implements CustomPortletMode
{
@@ -97,11 +97,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java Thu Jun 18 05:11:11 2009
@@ -16,7 +16,6 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -25,6 +24,7 @@
import org.apache.jetspeed.om.portlet.CustomWindowState;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
public class CustomWindowStateImpl implements CustomWindowState
{
@@ -97,11 +97,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java Thu Jun 18 05:11:11 2009
@@ -28,6 +28,7 @@
import org.apache.jetspeed.om.portlet.EventDefinition;
import org.apache.jetspeed.om.portlet.PortletQName;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -57,11 +58,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
@@ -131,12 +133,13 @@
}
return result;
}
-
+
+ @SuppressWarnings("unchecked")
public void addAlias(QName alias)
{
if (aliases == null)
{
- aliases = new ArrayList<EventAliasImpl>();
+ aliases = CollectionUtils.createList();
}
if (!containsAlias(alias))
{
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterImpl.java Thu Jun 18 05:11:11 2009
@@ -30,6 +30,7 @@
import org.apache.jetspeed.om.portlet.FilterLifecycle;
import org.apache.jetspeed.om.portlet.InitParam;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -49,12 +50,13 @@
{
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
-
+
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
@@ -78,11 +80,12 @@
return (DisplayName)JetspeedLocale.getBestLocalizedObject(getDisplayNames(), locale);
}
+ @SuppressWarnings("unchecked")
public List<DisplayName> getDisplayNames()
{
if (displayNames == null)
{
- displayNames = new ArrayList<DisplayName>();
+ displayNames = CollectionUtils.createList();
}
return displayNames;
}
@@ -121,11 +124,12 @@
filterClass = value;
}
+ @SuppressWarnings("unchecked")
public List<String> getLifecycles()
{
if (lifecycles == null)
{
- lifecycles = new ArrayList<FilterLifecycle>();
+ lifecycles = CollectionUtils.createList();
}
List<String> result = new ArrayList<String>();
for (FilterLifecycle flc : lifecycles)
@@ -135,11 +139,12 @@
return result;
}
+ @SuppressWarnings("unchecked")
public void addLifecycle(String name)
{
if (lifecycles == null)
{
- lifecycles = new ArrayList<FilterLifecycle>();
+ lifecycles = CollectionUtils.createList();
}
for (FilterLifecycle flc : this.lifecycles)
{
@@ -163,11 +168,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<InitParam> getInitParams()
{
if (initParams == null)
{
- initParams = new ArrayList<InitParam>();
+ initParams = CollectionUtils.createList();
}
return initParams;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterMappingImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterMappingImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterMappingImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FilterMappingImpl.java Thu Jun 18 05:11:11 2009
@@ -23,6 +23,7 @@
import org.apache.jetspeed.om.portlet.FilterMapping;
import org.apache.jetspeed.om.portlet.FilteredPortlet;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -43,11 +44,12 @@
filterName = value;
}
+ @SuppressWarnings("unchecked")
public List<String> getPortletNames()
{
if (portletNames == null)
{
- portletNames = new ArrayList<FilteredPortlet>();
+ portletNames = CollectionUtils.createList();
}
List<String> result = new ArrayList<String>();
for (FilteredPortlet fp : portletNames)
@@ -57,11 +59,12 @@
return result;
}
+ @SuppressWarnings("unchecked")
public void addPortletName(String name)
{
if (portletNames == null)
{
- portletNames = new ArrayList<FilteredPortlet>();
+ portletNames = CollectionUtils.createList();
}
for (FilteredPortlet fp : this.portletNames)
{
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InitParamImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InitParamImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InitParamImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/InitParamImpl.java Thu Jun 18 05:11:11 2009
@@ -18,7 +18,6 @@
package org.apache.jetspeed.om.portlet.impl;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -26,7 +25,7 @@
import org.apache.jetspeed.om.portlet.InitParam;
import org.apache.jetspeed.util.HashCodeBuilder;
import org.apache.jetspeed.util.JetspeedLocale;
-
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
@@ -90,12 +89,13 @@
{
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
-
+
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ListenerImpl.java Thu Jun 18 05:11:11 2009
@@ -18,7 +18,6 @@
package org.apache.jetspeed.om.portlet.impl;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -26,6 +25,7 @@
import org.apache.jetspeed.om.portlet.DisplayName;
import org.apache.jetspeed.om.portlet.Listener;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -54,11 +54,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
@@ -82,11 +83,12 @@
return (DisplayName)JetspeedLocale.getBestLocalizedObject(getDisplayNames(), locale);
}
+ @SuppressWarnings("unchecked")
public List<DisplayName> getDisplayNames()
{
if (displayNames == null)
{
- displayNames = new ArrayList<DisplayName>();
+ displayNames = CollectionUtils.createList();
}
return displayNames;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java Thu Jun 18 05:11:11 2009
@@ -53,6 +53,7 @@
import org.apache.jetspeed.om.portlet.UserAttribute;
import org.apache.jetspeed.om.portlet.UserAttributeRef;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
import org.apache.ojb.broker.PersistenceBroker;
import org.apache.ojb.broker.PersistenceBrokerAware;
import org.apache.ojb.broker.PersistenceBrokerException;
@@ -107,7 +108,7 @@
private List<ContainerRuntimeOption> containerRuntimeOptions;
private List<UserAttributeRef> userAttributeRefs;
- private List<JetspeedServiceReference> services = new ArrayList<JetspeedServiceReference>();
+ private List<JetspeedServiceReference> services;
private List<LocaleEncodingMapping> localeEncodingMappingList;
@@ -249,11 +250,12 @@
/**
* @see org.apache.jetspeed.om.portlet.PortletApplication#getMetadata()
*/
+ @SuppressWarnings("unchecked")
public GenericMetadata getMetadata()
{
if(metadataFields == null)
{
- metadataFields = new ArrayList<LocalizedField>();
+ metadataFields = CollectionUtils.createCollection();
}
GenericMetadata metadata = new PortletApplicationMetadataImpl();
@@ -267,11 +269,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
@@ -295,11 +298,12 @@
return (DisplayName)JetspeedLocale.getBestLocalizedObject(getDisplayNames(), locale);
}
+ @SuppressWarnings("unchecked")
public List<DisplayName> getDisplayNames()
{
if (displayNames == null)
{
- displayNames = new ArrayList<DisplayName>();
+ displayNames = CollectionUtils.createList();
}
return displayNames;
}
@@ -318,11 +322,12 @@
return d;
}
+ @SuppressWarnings("unchecked")
public List<SecurityRole> getSecurityRoles()
{
if (roles == null)
{
- roles = new ArrayList<SecurityRole>();
+ roles = CollectionUtils.createList();
}
return roles;
}
@@ -354,11 +359,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<PortletDefinition> getPortlets()
{
if (portlets == null)
{
- portlets = new ArrayList<PortletDefinition>();
+ portlets = CollectionUtils.createList();
}
return portlets;
}
@@ -376,11 +382,12 @@
return portlet;
}
+ @SuppressWarnings("unchecked")
public List<EventDefinition> getEventDefinitions()
{
if (eventDefinitions == null)
{
- eventDefinitions = new ArrayList<EventDefinition>();
+ eventDefinitions = CollectionUtils.createList();
}
return eventDefinitions;
}
@@ -418,11 +425,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<PublicRenderParameter> getPublicRenderParameters()
{
if (publicRenderParameters == null)
{
- publicRenderParameters = new ArrayList<PublicRenderParameter>();
+ publicRenderParameters = CollectionUtils.createList();
}
return publicRenderParameters;
}
@@ -492,11 +500,12 @@
}
}
+ @SuppressWarnings("unchecked")
public List<CustomPortletMode> getCustomPortletModes()
{
if (customPortletModes == null)
{
- customPortletModes = new ArrayList<CustomPortletMode>();
+ customPortletModes = CollectionUtils.createList();
}
return customPortletModes;
}
@@ -546,11 +555,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<CustomWindowState> getCustomWindowStates()
{
if (customWindowStates == null)
{
- customWindowStates = new ArrayList<CustomWindowState>();
+ customWindowStates = CollectionUtils.createList();
}
return customWindowStates;
}
@@ -655,11 +665,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<UserAttribute> getUserAttributes()
{
if (userAttributes == null)
{
- userAttributes = new ArrayList<UserAttribute>();
+ userAttributes = CollectionUtils.createList();
}
return userAttributes;
}
@@ -688,11 +699,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<UserAttributeRef> getUserAttributeRefs()
{
if (userAttributeRefs == null)
{
- userAttributeRefs = new ArrayList<UserAttributeRef>();
+ userAttributeRefs = CollectionUtils.createList();
}
return userAttributeRefs;
}
@@ -709,11 +721,12 @@
return uar;
}
+ @SuppressWarnings("unchecked")
public List<SecurityConstraint> getSecurityConstraints()
{
if (securityConstraints == null)
{
- securityConstraints = new ArrayList<SecurityConstraint>();
+ securityConstraints = CollectionUtils.createList();
}
return securityConstraints;
}
@@ -774,11 +787,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<Filter> getFilters()
{
if (filters == null)
{
- filters = new ArrayList<Filter>();
+ filters = CollectionUtils.createList();
}
return filters;
}
@@ -807,11 +821,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<FilterMapping> getFilterMappings()
{
if (filterMappings == null)
{
- filterMappings = new ArrayList<FilterMapping>();
+ filterMappings = CollectionUtils.createList();
}
return filterMappings;
}
@@ -828,11 +843,12 @@
return fm;
}
+ @SuppressWarnings("unchecked")
public List<Listener> getListeners()
{
if (listeners == null)
{
- listeners = new ArrayList<Listener>();
+ listeners = CollectionUtils.createList();
}
return listeners;
}
@@ -864,11 +880,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<ContainerRuntimeOption> getContainerRuntimeOptions()
{
if (containerRuntimeOptions == null)
{
- containerRuntimeOptions = new ArrayList<ContainerRuntimeOption>();
+ containerRuntimeOptions = CollectionUtils.createList();
}
return containerRuntimeOptions;
}
@@ -905,20 +922,22 @@
return localeEncodingMappings;
}
+ @SuppressWarnings("unchecked")
public void addLocaleEncodingMapping(Locale locale, String encoding)
{
if (localeEncodingMappingList == null)
{
- localeEncodingMappingList = new ArrayList<LocaleEncodingMapping>();
+ localeEncodingMappingList = CollectionUtils.createList();
}
localeEncodingMappingList.add(new LocaleEncodingMappingImpl(locale, encoding));
}
+ @SuppressWarnings("unchecked")
public List<JetspeedServiceReference> getJetspeedServices()
{
if (services == null)
{
- this.services = new ArrayList<JetspeedServiceReference>();
+ this.services = CollectionUtils.createList();
}
return services;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java Thu Jun 18 05:11:11 2009
@@ -46,6 +46,7 @@
import org.apache.jetspeed.om.portlet.Supports;
import org.apache.jetspeed.util.HashCodeBuilder;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
import org.apache.ojb.broker.PersistenceBroker;
import org.apache.ojb.broker.PersistenceBrokerAware;
import org.apache.ojb.broker.PersistenceBrokerException;
@@ -209,21 +210,23 @@
return lang;
}
+ @SuppressWarnings("unchecked")
public List<Language> getLanguages()
{
if ( languages == null )
{
- languages = new ArrayList<Language>();
+ languages = CollectionUtils.createList();
}
return languages;
}
+ @SuppressWarnings("unchecked")
public Language addLanguage(Locale locale)
{
// ensure languages exist
if ( languages == null )
{
- languages = new ArrayList<Language>();
+ languages = CollectionUtils.createList();
}
for (Language l : languages)
@@ -285,11 +288,12 @@
preferenceValidatorClassname = string;
}
+ @SuppressWarnings("unchecked")
public GenericMetadata getMetadata()
{
if (metadataFields == null)
{
- metadataFields = new ArrayList<LocalizedField>();
+ metadataFields = CollectionUtils.createCollection();
}
GenericMetadata metadata = new PortletDefinitionMetadataImpl();
@@ -426,11 +430,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<ContainerRuntimeOption> getContainerRuntimeOptions()
{
if (containerRuntimeOptions == null)
{
- containerRuntimeOptions = new ArrayList<ContainerRuntimeOption>();
+ containerRuntimeOptions = CollectionUtils.createList();
}
return containerRuntimeOptions;
}
@@ -458,11 +463,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<SecurityRoleRef> getSecurityRoleRefs()
{
if (securityRoleRefs == null)
{
- securityRoleRefs = new ArrayList<SecurityRoleRef>();
+ securityRoleRefs = CollectionUtils.createList();
}
return securityRoleRefs;
}
@@ -496,11 +502,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<Supports> getSupports()
{
if (supports == null)
{
- supports = new ArrayList<Supports>();
+ supports = CollectionUtils.createList();
}
return supports;
}
@@ -536,11 +543,12 @@
// noop: use addLanguage(Locale) instead
}
+ @SuppressWarnings("unchecked")
public List<String> getSupportedPublicRenderParameters()
{
if (supportedPublicRenderParameters == null)
{
- supportedPublicRenderParameters = new ArrayList<SupportedPublicRenderParameter>();
+ supportedPublicRenderParameters = CollectionUtils.createList();
}
List<String> params = new ArrayList<String>();
for (SupportedPublicRenderParameter param : this.supportedPublicRenderParameters)
@@ -550,11 +558,12 @@
return params;
}
+ @SuppressWarnings("unchecked")
public void addSupportedPublicRenderParameter(String identifier)
{
if (supportedPublicRenderParameters == null)
{
- supportedPublicRenderParameters = new ArrayList<SupportedPublicRenderParameter>();
+ supportedPublicRenderParameters = CollectionUtils.createList();
}
for (SupportedPublicRenderParameter param : this.supportedPublicRenderParameters)
{
@@ -596,11 +605,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
@@ -625,11 +635,12 @@
return (DisplayName)JetspeedLocale.getBestLocalizedObject(getDisplayNames(), locale);
}
+ @SuppressWarnings("unchecked")
public List<DisplayName> getDisplayNames()
{
if (displayNames == null)
{
- displayNames = new ArrayList<DisplayName>();
+ displayNames = CollectionUtils.createList();
}
return displayNames;
}
@@ -660,11 +671,12 @@
return null;
}
+ @SuppressWarnings("unchecked")
public List<InitParam> getInitParams()
{
if (initParams == null)
{
- initParams = new ArrayList<InitParam>();
+ initParams = CollectionUtils.createList();
}
return initParams;
}
@@ -681,11 +693,12 @@
return param;
}
+ @SuppressWarnings("unchecked")
public List<EventDefinitionReference> getSupportedProcessingEvents()
{
if (supportedProcessingEvents == null)
{
- supportedProcessingEvents = new ArrayList<EventDefinitionReference>();
+ supportedProcessingEvents = CollectionUtils.createList();
}
return supportedProcessingEvents;
}
@@ -711,11 +724,12 @@
return this.addSupportedProcessingEvent(qname);
}
+ @SuppressWarnings("unchecked")
public List<EventDefinitionReference> getSupportedPublishingEvents()
{
if (supportedPublishingEvents == null)
{
- supportedPublishingEvents = new ArrayList<EventDefinitionReference>();
+ supportedPublishingEvents = CollectionUtils.createList();
}
return supportedPublishingEvents;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java Thu Jun 18 05:11:11 2009
@@ -28,6 +28,7 @@
import org.apache.jetspeed.om.portlet.PortletQName;
import org.apache.jetspeed.om.portlet.PublicRenderParameter;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -160,11 +161,12 @@
return result;
}
+ @SuppressWarnings("unchecked")
public void addAlias(QName alias)
{
if (aliases == null)
{
- aliases = new ArrayList<ParameterAliasImpl>();
+ aliases = CollectionUtils.createList();
}
if (!containsAlias(alias))
{
@@ -188,11 +190,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityConstraintImpl.java Thu Jun 18 05:11:11 2009
@@ -28,6 +28,7 @@
import org.apache.jetspeed.om.portlet.SecurityConstraint;
import org.apache.jetspeed.om.portlet.UserDataConstraint;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -44,11 +45,12 @@
return (DisplayName)JetspeedLocale.getBestLocalizedObject(getDisplayNames(), locale);
}
+ @SuppressWarnings("unchecked")
public List<DisplayName> getDisplayNames()
{
if (displayNames == null)
{
- displayNames = new ArrayList<DisplayName>();
+ displayNames = CollectionUtils.createList();
}
return displayNames;
}
@@ -67,11 +69,12 @@
return d;
}
+ @SuppressWarnings("unchecked")
public List<String> getPortletNames()
{
if (portletNames == null)
{
- portletNames = new ArrayList<SecuredPortlet>();
+ portletNames = CollectionUtils.createList();
}
List<String> result = new ArrayList<String>();
for (SecuredPortlet sp : portletNames)
@@ -81,11 +84,12 @@
return result;
}
+ @SuppressWarnings("unchecked")
public void addPortletName(String portletName)
{
if (portletNames == null)
{
- portletNames = new ArrayList<SecuredPortlet>();
+ portletNames = CollectionUtils.createList();
}
for (SecuredPortlet sp : portletNames)
{
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleImpl.java Thu Jun 18 05:11:11 2009
@@ -16,13 +16,13 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.om.portlet.SecurityRole;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
*
@@ -51,12 +51,13 @@
{
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
-
+
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SecurityRoleRefImpl.java Thu Jun 18 05:11:11 2009
@@ -17,7 +17,6 @@
package org.apache.jetspeed.om.portlet.impl;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -25,6 +24,7 @@
import org.apache.jetspeed.om.portlet.SecurityRoleRef;
import org.apache.jetspeed.util.HashCodeBuilder;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
*
@@ -89,12 +89,13 @@
{
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
-
+
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeImpl.java Thu Jun 18 05:11:11 2009
@@ -16,13 +16,13 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.om.portlet.UserAttribute;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* <p>User attribute implementation.</p>
@@ -53,11 +53,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeRefImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeRefImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeRefImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserAttributeRefImpl.java Thu Jun 18 05:11:11 2009
@@ -16,7 +16,6 @@
*/
package org.apache.jetspeed.om.portlet.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -24,6 +23,7 @@
import org.apache.jetspeed.om.portlet.UserAttribute;
import org.apache.jetspeed.om.portlet.UserAttributeRef;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* <p>User attribute ref implementation.</p>
@@ -89,12 +89,13 @@
{
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
-
+
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserDataConstraintImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserDataConstraintImpl.java?rev=785910&r1=785909&r2=785910&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserDataConstraintImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/UserDataConstraintImpl.java Thu Jun 18 05:11:11 2009
@@ -18,13 +18,13 @@
package org.apache.jetspeed.om.portlet.impl;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.jetspeed.om.portlet.Description;
import org.apache.jetspeed.om.portlet.UserDataConstraint;
import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.util.ojb.CollectionUtils;
/**
* @version $Id$
@@ -40,11 +40,12 @@
return (Description)JetspeedLocale.getBestLocalizedObject(getDescriptions(), locale);
}
+ @SuppressWarnings("unchecked")
public List<Description> getDescriptions()
{
if (descriptions == null)
{
- descriptions = new ArrayList<Description>();
+ descriptions = CollectionUtils.createList();
}
return descriptions;
}
Added: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java?rev=785910&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java Thu Jun 18 05:11:11 2009
@@ -0,0 +1,346 @@
+/*
+ * 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.util.ojb;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.ojb.broker.ManageableCollection;
+import org.apache.ojb.broker.PersistenceBroker;
+import org.apache.ojb.broker.PersistenceBrokerException;
+import org.apache.ojb.broker.util.collections.IRemovalAwareCollection;
+import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
+import org.apache.ojb.broker.util.collections.RemovalAwareList;
+
+/**
+ * CollectionUtils
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class CollectionUtils
+{
+ /**
+ * OJB 1.0.3 requires collections to be removal aware.
+ * Thus we can't seem to get away with just creating ArrayLists
+ * This issue on occurs when persisting newly create object collections
+ * When persisting objects retrieved with OJB, this issue does not occur
+ *
+ * @see JS2-590
+ * @return
+ */
+
+ @SuppressWarnings("unchecked")
+ public static final Collection createCollection()
+ {
+ // highly concurrent applications will require using
+ // createSynchronizedCollection() here instead of this OJB
+ // native type which is not synchronized.
+ return new RemovalAwareCollection();
+ }
+
+ /**
+ * Synchronized OJB removal aware collection.
+ */
+ @SuppressWarnings("unchecked")
+ public static class SynchronizedRemovalAwareCollection implements Collection, ManageableCollection, IRemovalAwareCollection
+ {
+ private static final long serialVersionUID = 1L;
+
+ private RemovalAwareCollection collection = new RemovalAwareCollection();
+
+ public synchronized boolean add(Object e)
+ {
+ return collection.add(e);
+ }
+
+ public synchronized boolean addAll(Collection c)
+ {
+ return collection.addAll(c);
+ }
+
+ public synchronized void clear()
+ {
+ collection.clear();
+ }
+
+ public synchronized boolean contains(Object o)
+ {
+ return collection.contains(o);
+ }
+
+ public synchronized boolean containsAll(Collection c)
+ {
+ return collection.containsAll(c);
+ }
+
+ public synchronized boolean isEmpty()
+ {
+ return collection.isEmpty();
+ }
+
+ public synchronized Iterator iterator()
+ {
+ return collection.iterator();
+ }
+
+ public synchronized boolean remove(Object o)
+ {
+ return collection.remove(o);
+ }
+
+ public synchronized boolean removeAll(Collection c)
+ {
+ return collection.removeAll(c);
+ }
+
+ public synchronized boolean retainAll(Collection c)
+ {
+ return collection.retainAll(c);
+ }
+
+ public synchronized int size()
+ {
+ return collection.size();
+ }
+
+ public synchronized Object[] toArray()
+ {
+ return collection.toArray();
+ }
+
+ public synchronized Object[] toArray(Object[] a)
+ {
+ return collection.toArray(a);
+ }
+
+ public synchronized void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
+ {
+ collection.afterStore(broker);
+ }
+
+ public synchronized void ojbAdd(Object anObject)
+ {
+ collection.ojbAdd(anObject);
+ }
+
+ public synchronized void ojbAddAll(ManageableCollection otherCollection)
+ {
+ collection.ojbAddAll(otherCollection);
+ }
+
+ public synchronized Iterator ojbIterator()
+ {
+ return collection.ojbIterator();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static final Collection createSynchronizedCollection()
+ {
+ // if OJB collections are to be synchronized, collection-class
+ // attributes for collection-descriptor need to be set in the
+ // OJB mappings to ensure that collections are synchronized
+ // when read from the database, (unsynchronized removal aware
+ // collections are the default):
+ //
+ // <collection-descriptor ... collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection">
+ //
+ // here, return synchronized manageable/removal aware
+ // collection; note that simply wrapping a RemovalAwareCollection
+ // using Collections.synchronizedCollection() will not work since
+ // OJB collections that are removal aware must implement the
+ // ManageableCollection, IRemovalAwareCollection interfaces.
+ return new SynchronizedRemovalAwareCollection();
+ }
+
+ @SuppressWarnings("unchecked")
+ public static final List createList()
+ {
+ // highly concurrent applications will require using
+ // createSynchronizedList() here instead of this OJB
+ // native type which is not synchronized.
+ return new RemovalAwareList();
+ }
+
+ /**
+ * Synchronized OJB removal aware list.
+ */
+ @SuppressWarnings("unchecked")
+ public static class SynchronizedRemovalAwareList implements List, ManageableCollection, IRemovalAwareCollection
+ {
+ private static final long serialVersionUID = 1L;
+
+ private RemovalAwareList list = new RemovalAwareList();
+
+ public synchronized void add(int index, Object element)
+ {
+ list.add(index, element);
+ }
+
+ public synchronized boolean add(Object e)
+ {
+ return list.add(e);
+ }
+
+ public synchronized boolean addAll(Collection c)
+ {
+ return list.addAll(c);
+ }
+
+ public synchronized boolean addAll(int index, Collection c)
+ {
+ return list.addAll(index, c);
+ }
+
+ public synchronized void clear()
+ {
+ list.clear();
+ }
+
+ public synchronized boolean contains(Object o)
+ {
+ return list.contains(o);
+ }
+
+ public synchronized boolean containsAll(Collection c)
+ {
+ return list.containsAll(c);
+ }
+
+ public synchronized Object get(int index)
+ {
+ return list.get(index);
+ }
+
+ public synchronized int indexOf(Object o)
+ {
+ return list.indexOf(o);
+ }
+
+ public synchronized boolean isEmpty()
+ {
+ return list.isEmpty();
+ }
+
+ public synchronized Iterator iterator()
+ {
+ return list.iterator();
+ }
+
+ public synchronized int lastIndexOf(Object o)
+ {
+ return list.lastIndexOf(o);
+ }
+
+ public synchronized ListIterator listIterator()
+ {
+ return list.listIterator();
+ }
+
+ public synchronized ListIterator listIterator(int index)
+ {
+ return list.listIterator(index);
+ }
+
+ public synchronized Object remove(int index)
+ {
+ return list.remove(index);
+ }
+
+ public synchronized boolean remove(Object o)
+ {
+ return list.remove(o);
+ }
+
+ public synchronized boolean removeAll(Collection c)
+ {
+ return list.removeAll(c);
+ }
+
+ public synchronized boolean retainAll(Collection c)
+ {
+ return list.retainAll(c);
+ }
+
+ public synchronized Object set(int index, Object element)
+ {
+ return list.set(index, element);
+ }
+
+ public synchronized int size()
+ {
+ return list.size();
+ }
+
+ public synchronized List subList(int fromIndex, int toIndex)
+ {
+ return list.subList(fromIndex, toIndex);
+ }
+
+ public synchronized Object[] toArray()
+ {
+ return list.toArray();
+ }
+
+ public synchronized Object[] toArray(Object[] a)
+ {
+ return list.toArray(a);
+ }
+
+ public synchronized void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
+ {
+ list.afterStore(broker);
+ }
+
+ public synchronized void ojbAdd(Object anObject)
+ {
+ list.ojbAdd(anObject);
+ }
+
+ public synchronized void ojbAddAll(ManageableCollection otherCollection)
+ {
+ list.ojbAddAll(otherCollection);
+ }
+
+ public synchronized Iterator ojbIterator()
+ {
+ return list.ojbIterator();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static final List createSynchronizedList()
+ {
+ // if OJB lists are to be synchronized, collection-class
+ // attributes for collection-descriptor need to be set in the
+ // OJB mappings to ensure that lists are synchronized when
+ // read from the database, (unsynchronized removal aware
+ // lists are the default):
+ //
+ // <collection-descriptor ... collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList">
+ //
+ // here, return synchronized manageable/removal aware list;
+ // note that simply wrapping a RemovalAwareList using
+ // Collections.synchronizedList() will not work since
+ // OJB lists that are removal aware must implement the
+ // ManageableCollection, IRemovalAwareCollection interfaces.
+ return new SynchronizedRemovalAwareList();
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org