Modified: portals/jetspeed-2/portal/branches/JS2-869/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/objects/JSUserAttributes.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/objects/JSUserAttributes.java?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/objects/JSUserAttributes.java (original) +++ portals/jetspeed-2/portal/branches/JS2-869/components/jetspeed-serializer/src/main/java/org/apache/jetspeed/serializer/objects/JSUserAttributes.java Fri Jul 18 17:17:27 2008 @@ -28,7 +28,12 @@ */ public JSUserAttributes(Preferences preferences) { - super(preferences); + // TODO: the JSNVPElements class doesn't support/use Preferences anymore + // because of its dual usage for PortletPreferences as well + // goto break these two usages apart and provide separate implementations + // NOTE: JSVNPElements is't very well implemented anyway (doesn't seem to be able to handle multi-value elements...) +// super(preferences); + super(); } public JSUserAttributes() {
Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityAccessComponent.java Fri Jul 18 17:17:27 2008 @@ -1,182 +1,177 @@ -/* +/* * 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.components.portletentity; - -import java.io.IOException; -import java.util.Collection; - -import org.apache.jetspeed.om.common.portlet.MutablePortletEntity; -import org.apache.jetspeed.om.page.ContentFragment; -import org.apache.jetspeed.om.page.Fragment; -import org.apache.pluto.om.common.ObjectID; -import org.apache.pluto.om.common.PreferenceSet; -import org.apache.pluto.om.entity.PortletEntity; -import org.apache.pluto.om.portlet.PortletDefinition; - -/** - * <p> - * PortletEntityAccessComponent - * </p> - * - * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a> - * @version $Id: PortletEntityAccessComponent.java,v 1.8 2005/04/29 13:59:46 weaver Exp $ - * - */ -public interface PortletEntityAccessComponent -{ - /** - * - * <p> - * getPortletEntity - * </p> - * - * @param id - * @return - */ - MutablePortletEntity getPortletEntity(ObjectID id); - - MutablePortletEntity getPortletEntity(String id); - - /** - * - * <p> - * generateEntityFromFragment - * </p> - * - * @param fragment - * @return - * @throws PortletEntityNotGeneratedException - */ - MutablePortletEntity generateEntityFromFragment(ContentFragment fragment) throws PortletEntityNotGeneratedException; - - /** - * - * <p> - * generateEntityKey - * </p> - * - * @param fragment - * @return - */ - ObjectID generateEntityKey(Fragment fragment); - - /** - * - * <p> - * newPortletEntityInstance - * </p> - * - * @param portletDefinition - * @return - */ - MutablePortletEntity newPortletEntityInstance(PortletDefinition portletDefinition); - MutablePortletEntity newPortletEntityInstance(PortletDefinition portletDefinition, String id); - - /** - * - * <p> - * getPortletEntityForFragment - * </p> - * - * @param fragment - * @return - * @throws PortletEntityNotStoredException - */ - MutablePortletEntity getPortletEntityForFragment(ContentFragment fragment) throws PortletEntityNotStoredException; - - /** - * - * <p> - * removePortletEntity - * </p> - * - * @param portletEntity - * @throws PortletEntityNotDeletedException - */ - void removePortletEntity(PortletEntity portletEntity) throws PortletEntityNotDeletedException; - - /** - * - * <p> - * removeFromCache - * </p> - * Removes a PortletEntity from the cache. - * @param entity - */ - void removeFromCache(PortletEntity entity); - - /** - * <p> - * updatePortletEntity - * </p> - * - * Updates portlet definition associated with the portlet - * entity to match the fragment configuration - * - * @param portletEntity - * @param fragment - * @throws PortletEntityNotStoredException - */ - void updatePortletEntity(PortletEntity portletEntity, ContentFragment fragment) throws PortletEntityNotStoredException; - - /** - * - * <p> - * storePortletEntity - * </p> - * - * @param portletEntity - * @throws PortletEntityNotStoredException - */ - void storePortletEntity(PortletEntity portletEntity) throws PortletEntityNotStoredException; - - /** - * - * <p> - * getPortletEntities - * </p> - * - * @param portletDefinition - * @return - */ - Collection getPortletEntities(PortletDefinition portletDefinition); - - Collection getPortletEntities( String portletUniqueName ); - - /** - * - * <p> - * removePortletEntities - * </p> - * - * @param portletDefinition - * @throws PortletEntityNotDeletedException - */ - void removePortletEntities(PortletDefinition portletDefinition) throws PortletEntityNotDeletedException; - - - void storePreferenceSet(PreferenceSet prefSet, PortletEntity entity) throws IOException; - - /** - * All preferences were shared. With JS2-449, preferences are now - * stored 'per user'. The username is stored in the preferences FULL_PATH - * To turn on mergeSharedPreferences configure this property to true - * in your Spring configuration. This will NOT turn off per user prefs, - * but instead merge with them, where user prefs override. - */ - boolean isMergeSharedPreferences(); -} + * 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.components.portletentity; + +import java.util.Collection; + +import org.apache.jetspeed.om.common.portlet.MutablePortletEntity; +import org.apache.jetspeed.om.page.ContentFragment; +import org.apache.jetspeed.om.page.Fragment; +import org.apache.pluto.om.common.ObjectID; +import org.apache.pluto.om.entity.PortletEntity; +import org.apache.pluto.om.portlet.PortletDefinition; + +/** + * <p> + * PortletEntityAccessComponent + * </p> + * + * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a> + * @version $Id: PortletEntityAccessComponent.java,v 1.8 2005/04/29 13:59:46 weaver Exp $ + * + */ +public interface PortletEntityAccessComponent +{ + /** + * + * <p> + * getPortletEntity + * </p> + * + * @param id + * @return + */ + MutablePortletEntity getPortletEntity(ObjectID id); + + MutablePortletEntity getPortletEntity(String id); + + /** + * + * <p> + * generateEntityFromFragment + * </p> + * + * @param fragment + * @return + * @throws PortletEntityNotGeneratedException + */ + MutablePortletEntity generateEntityFromFragment(ContentFragment fragment) throws PortletEntityNotGeneratedException; + + /** + * + * <p> + * generateEntityKey + * </p> + * + * @param fragment + * @return + */ + ObjectID generateEntityKey(Fragment fragment); + + /** + * + * <p> + * newPortletEntityInstance + * </p> + * + * @param portletDefinition + * @return + */ + MutablePortletEntity newPortletEntityInstance(PortletDefinition portletDefinition); + MutablePortletEntity newPortletEntityInstance(PortletDefinition portletDefinition, String id); + + /** + * + * <p> + * getPortletEntityForFragment + * </p> + * + * @param fragment + * @return + * @throws PortletEntityNotStoredException + */ + MutablePortletEntity getPortletEntityForFragment(ContentFragment fragment) throws PortletEntityNotStoredException; + + /** + * + * <p> + * removePortletEntity + * </p> + * + * @param portletEntity + * @throws PortletEntityNotDeletedException + */ + void removePortletEntity(PortletEntity portletEntity) throws PortletEntityNotDeletedException; + + /** + * + * <p> + * removeFromCache + * </p> + * Removes a PortletEntity from the cache. + * @param entity + */ + void removeFromCache(PortletEntity entity); + + /** + * <p> + * updatePortletEntity + * </p> + * + * Updates portlet definition associated with the portlet + * entity to match the fragment configuration + * + * @param portletEntity + * @param fragment + * @throws PortletEntityNotStoredException + */ + void updatePortletEntity(PortletEntity portletEntity, ContentFragment fragment) throws PortletEntityNotStoredException; + + /** + * + * <p> + * storePortletEntity + * </p> + * + * @param portletEntity + * @throws PortletEntityNotStoredException + */ + void storePortletEntity(PortletEntity portletEntity) throws PortletEntityNotStoredException; + + /** + * + * <p> + * getPortletEntities + * </p> + * + * @param portletDefinition + * @return + */ + Collection getPortletEntities(PortletDefinition portletDefinition); + + Collection getPortletEntities( String portletUniqueName ); + + /** + * + * <p> + * removePortletEntities + * </p> + * + * @param portletDefinition + * @throws PortletEntityNotDeletedException + */ + void removePortletEntities(PortletDefinition portletDefinition) throws PortletEntityNotDeletedException; + + /** + * All preferences were shared. With JS2-449, preferences are now + * stored 'per user'. The username is stored in the preferences FULL_PATH + * To turn on mergeSharedPreferences configure this property to true + * in your Spring configuration. This will NOT turn off per user prefs, + * but instead merge with them, where user prefs override. + */ + boolean isMergeSharedPreferences(); +} Added: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java?rev=678081&view=auto ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java (added) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java Fri Jul 18 17:17:27 2008 @@ -0,0 +1,35 @@ +/* + * 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.components.portletpreferences; + +import java.util.Iterator; + +import org.apache.jetspeed.om.common.portlet.MutablePortletEntity; +import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite; +import org.apache.jetspeed.om.common.preference.PreferenceSetComposite; + +public interface PortletPreferencesProvider +{ + void init() throws Exception; + public PreferenceSetComposite getPreferenceSet(PortletDefinitionComposite pd); + public PreferenceSetComposite getPreferenceSet(MutablePortletEntity pe); + public PreferenceSetComposite getPreferenceSet(MutablePortletEntity pe, String userName); + public Iterator<String> getUserNames(MutablePortletEntity pe); + public void savePreferenceSet(PortletDefinitionComposite pd, PreferenceSetComposite preferenceSet); + public void savePreferenceSet(MutablePortletEntity pe, PreferenceSetComposite preferenceSet); + public void savePreferenceSet(MutablePortletEntity pe, String userName, PreferenceSetComposite preferenceSet); +} Propchange: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java ------------------------------------------------------------------------------ svn:keywords = Id Propchange: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/MutablePortletEntity.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/MutablePortletEntity.java?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/MutablePortletEntity.java (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/MutablePortletEntity.java Fri Jul 18 17:17:27 2008 @@ -35,7 +35,25 @@ public static final String PORTLET_ENTITY_ROOT = "portlet_entity"; + Long getOid(); + String getPortletUniqueName(); void setFragment(Fragment fragment); + + /** + * <p> + * Persistence callback to allow a PortletEntity instance to persist children + * objects (like portlet preferences) <em>within</em> the same transaction. + * </p> + * <p> + * This method must be called <em>always</em> from the #store() method. Using a callback from + * the persistence manager might not be reliable when the PortletEntity <em>itself</em> + * isn't changed but children might. + * </p> + * <p> + * Notably condition when this might happen is the Pluto 1.0.1 preferences handling calling + * the portletEntity store() method + * */ + void storeChildren(); } Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/PortletDefinitionComposite.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/PortletDefinitionComposite.java?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/PortletDefinitionComposite.java (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/PortletDefinitionComposite.java Fri Jul 18 17:17:27 2008 @@ -125,8 +125,14 @@ void setPortletApplicationDefinition(PortletApplicationDefinition pad); + /** + * @obsolete use #getPreferenceSet.add(String, String[]) + */ PreferenceComposite addPreference(String name, String[] values); + /** + * @obsolete use #getPreferenceSet.add(String, String[]) + */ void addPreference(Preference preference); void setPortletIdentifier(String portletIndentifier); @@ -241,4 +247,20 @@ * the Jetspeed Security Constraints */ void setJetspeedSecurityConstraint(String constraint); + + /** + * <p> + * Persistence callback to allow a PortletDefinition instance to persist children + * objects (like portlet preferences) <em>within</em> the same transaction. + * </p> + * <p> + * This method must be called <em>always</em> from the #store() method. Using a callback from + * the persistence manager might not be reliable when the PortletDefinition <em>itself</em> + * isn't changed but children might. + * </p> + * <p> + * Notably condition when this might happen is the Pluto 1.0.1 preferences handling calling + * the portletDefinition store() method + * */ + void storeChildren(); } Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/preference/PreferenceComposite.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/preference/PreferenceComposite.java?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/preference/PreferenceComposite.java (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/preference/PreferenceComposite.java Fri Jul 18 17:17:27 2008 @@ -1,117 +1,65 @@ -/* +/* * 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.common.preference; - -import java.io.Serializable; -import java.util.Iterator; -import java.util.Locale; - -import org.apache.pluto.om.common.Description; -import org.apache.pluto.om.common.Preference; -import org.apache.pluto.om.common.PreferenceCtrl; - -/** - * - * PreferenceComposite - * - * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a> - * @version $Id: PreferenceComposite.java,v 1.2 2004/06/18 20:46:21 weaver Exp $ - * - */ -public interface PreferenceComposite extends PreferenceCtrl, Preference, Serializable -{ - String DEFAULT_PREFERENCE = "org.apache.pluto.om.common.Preference.default"; - String USER_PREFERENCE = "org.apache.pluto.om.common.Preference.default.user"; - - void addDescription(Locale locale, String Description); - - Description getDescription(Locale locale); - - /** - * @throws java.lang.ArrayIndexOutofBounds if index is outside the constraints - * @param index - * @return The String value at the specified index or <code>null</code> - * if no values are present. - */ - String getValueAt(int index); - - /** - * - * @param index - */ - void removeValueAt(int index); - - /** - * - * <p> - * setValueAt - * </p> - * Sets the current Preference's value at <code>index</code> - * to the specified <code>value</code> - * - * @param index Index hows value will be set. - * @param value Value to set - * - */ - void setValueAt(int index, String value); - - /** - * - * <p> - * addValue - * </p> - * Adds a new value to this Preference. - * @param value Vale to add to the preference - * - */ - void addValue(String value); - - /** - * - * @return - */ - String[] getValueArray(); - - /** - * - * <p> - * setValues - * </p> - * - * Replaces the current set of values of this preference - * with this one. - * - * @param stringValues - * - */ - void setValues(String[] stringValues); - - /** - * @return - */ - String getType(); - /** - * @param string - */ - void setType(String string); - - String[] cloneValues(); - - Iterator getDescriptions(); - -} + * 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.common.preference; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; + +import org.apache.pluto.om.common.Description; +import org.apache.pluto.om.common.Preference; +import org.apache.pluto.om.common.PreferenceCtrl; + +/** + * + * PreferenceComposite + * + * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a> + * @version $Id: PreferenceComposite.java,v 1.2 2004/06/18 20:46:21 weaver Exp $ + * + */ +public interface PreferenceComposite extends PreferenceCtrl, Preference, Serializable +{ + String DEFAULT_PREFERENCE = "org.apache.pluto.om.common.Preference.default"; + String USER_PREFERENCE = "org.apache.pluto.om.common.Preference.default.user"; + + void addDescription(Locale locale, String Description); + + Description getDescription(Locale locale); + + /** + * + * <p> + * addValue + * </p> + * Adds a new value to this Preference. + * @param value Vale to add to the preference + * + */ + void addValue(String value); + + /** + * + * @return + */ + List<String> getValuesList(); + + Iterator getDescriptions(); + +} Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml Fri Jul 18 17:17:27 2008 @@ -137,14 +137,47 @@ <table name="PORTLET_ENTITY"> <column name="PEID" primaryKey="true" required="true" type="INTEGER"/> <!-- <column name="PORTLET_DEFINITION_ID" required="true" type="INTEGER"/> --> - <column name="ID" required="true" size="255" type="VARCHAR"/> - <column name="APP_NAME" required="true" size="255" type="VARCHAR"/> - <column name="PORTLET_NAME" required="true" size="255" type="VARCHAR"/> + <column name="ID" required="true" size="80" type="VARCHAR"/> + <column name="APP_NAME" required="true" size="80" type="VARCHAR"/> + <column name="PORTLET_NAME" required="true" size="80" type="VARCHAR"/> <unique name="UK_ENTITY_ID"> <unique-column name="ID"/> </unique> </table> + <table name="PORTLET_PREFERENCE"> + <column name="ID" primaryKey="true" required="true" type="INTEGER"/> + <column name="APPLICATION_NAME" required="true" size="80" type="VARCHAR"/> + <column name="PORTLET_NAME" required="true" size="80" type="VARCHAR"/> + <column name="NAME" required="true" size="254" type="VARCHAR"/> + + <index name="IX_PORTLET_PREFERENCE"> + <index-column name="APPLICATION_NAME"/> + <index-column name="PORTLET_NAME"/> + </index> + </table> + + <table name="PORTLET_PREFERENCE_VALUE"> + <column name="PREF_ID" primaryKey="true" required="true" type="INTEGER"/> + <column name="INDEX" primaryKey="true" required="true" type="SMALLINT"/> + <column name="ENTITY_OID" primaryKey="true" required="true" type="INTEGER"/> + <column name="USER_NAME" primaryKey="true" required="true" size="80" type="VARCHAR"/> + <column name="ENTITY_ID" type="VARCHAR" size="80"/> + <column name="READONLY" required="true" type="BOOLEANINT"/> + <column name="NULL_VALUE" required="true" type="BOOLEANINT"/> + <column name="VALUE" size="4000" type="VARCHAR"/> + + <foreign-key foreignTable="PORTLET_PREFERENCE" name="FK_PORTLET_PREFERENCE" onDelete="cascade"> + <reference foreign="ID" local="PREF_ID"/> + </foreign-key> + <foreign-key foreignTable="PORTLET_ENTITY" name="FK_PORTLET_ENTITY" onDelete="cascade"> + <reference foreign="PEID" local="ENTITY_ID"/> + </foreign-key> + <index name="IX_PREFS_ENTITY_ID"> + <index-column name="ENTITY_ID"/> + </index> + </table> + <!-- Security Role Reference --> Modified: portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/resources/assembly/registry.xml URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/resources/assembly/registry.xml?rev=678081&r1=678080&r2=678081&view=diff ============================================================================== --- portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/resources/assembly/registry.xml (original) +++ portals/jetspeed-2/portal/branches/JS2-869/jetspeed-portal-resources/src/main/resources/assembly/registry.xml Fri Jul 18 17:17:27 2008 @@ -46,18 +46,15 @@ <value>JETSPEED-INF/ojb/registry_repository.xml</value> </constructor-arg> <constructor-arg index="1"> - <ref bean="portletFactory" /> - </constructor-arg> - <constructor-arg index="2"> <ref bean="portletApplicationOidCache" /> </constructor-arg> - <constructor-arg index="3"> + <constructor-arg index="2"> <ref bean="portletDefinitionOidCache" /> </constructor-arg> - <constructor-arg index="4"> + <constructor-arg index="3"> <ref bean="portletApplicationNameCache" /> </constructor-arg> - <constructor-arg index="5"> + <constructor-arg index="4"> <ref bean="portletDefinitionNameCache" /> </constructor-arg> </bean> @@ -89,6 +86,34 @@ </property> </bean> + <!-- Portlet Preferences Implementation --> + <bean id="PortletPreferencesProviderImpl" class="org.apache.jetspeed.components.portletpreferences.PersistenceBrokerPortletPreferencesProvider" + init-method="init" destroy-method="destroy"> + <meta key="j2:cat" value="default,registry" /> + <constructor-arg index="0"> + <ref bean="preferencesCache" /> + </constructor-arg> + </bean> + + <bean id="org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider" parent="baseTransactionProxy" name="portletPreferencesProvider" + destroy-method="destroy"> + <meta key="j2:cat" value="default,registry" /> + <property name="proxyInterfaces"> + <value>org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider</value> + </property> + + <property name="target"> + <ref bean="PortletPreferencesProviderImpl" /> + </property> + <property name="transactionAttributes"> + <props> + <prop key="save*">PROPAGATION_REQUIRED</prop> + <prop key="delete*">PROPAGATION_REQUIRED</prop> + <prop key="*">PROPAGATION_SUPPORTS</prop> + </props> + </property> + </bean> + <!-- - PortletEntity business object: OJB implementation, as an inner bean wrapped - by an outer transactional proxy. The two bean definitions could have been separate, @@ -101,9 +126,6 @@ <constructor-arg> <ref bean="portletRegistry" /> </constructor-arg> - <constructor-arg> - <ref bean="org.apache.jetspeed.request.RequestContextComponent" /> - </constructor-arg> <!-- All preferences were shared. With JS2-449, preferences are now stored 'per user'. The username is stored in the preferences FULL_PATH @@ -112,9 +134,6 @@ but instead merge with them, where user prefs override. boolean --> - <constructor-arg> - <ref bean="org.apache.jetspeed.page.PageManager" /> - </constructor-arg> <constructor-arg type="boolean"> <value>false</value> </constructor-arg> @@ -148,20 +167,4 @@ </property> </bean> - <!-- Inject Portlet Entity Proxy into Portlet Entity impl --> - <bean id="injectEntityAccessProxy" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> - <meta key="j2:cat" value="default,registry" /> - <property name="targetObject"> - <ref bean="portletEntityAccessImpl" /> - </property> - <property name="targetMethod"> - <value>setEntityAccessProxy</value> - </property> - <property name="arguments"> - <list> - <ref bean="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent" /> - </list> - </property> - </bean> - </beans> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
