You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Craig Doremus (JIRA)" <ji...@apache.org> on 2008/07/21 05:37:31 UTC
[jira] Reopened: (PLUTO-487) PortletPreferencesImpl should not
store the preferences every time it is instantiated
[ https://issues.apache.org/jira/browse/PLUTO-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Craig Doremus reopened PLUTO-487:
---------------------------------
This fix needs to be applied to trunk and 2.0-refactoring branch.
> PortletPreferencesImpl should not store the preferences every time it is instantiated
> -------------------------------------------------------------------------------------
>
> Key: PLUTO-487
> URL: https://issues.apache.org/jira/browse/PLUTO-487
> Project: Pluto
> Issue Type: Improvement
> Components: portlet container
> Affects Versions: 2.0.0, 2.0-refactoring
> Environment: Tomcat 5.5.26
> Reporter: Nikita Dubrovsky
> Assignee: Eric Dalquist
> Fix For: 2.0.0, 1.1.6
>
> Attachments: P487-1.1.x-Rev656347.diff
>
>
> In Pluto 1.1.5, the constructor of org.apache.pluto.internal.impl.PortletPreferencesImpl calls internalStore() every time. It would be better to only store the preferences when it is actually necessary -- I believe this is the case only when the prefs from portlet.xml have not yet been stored:
> ...
> Set portletXmlPrefNames = getPreferenceNames(defaultPreferences);
> Set persistedPrefNames = getPreferenceNames(storedPreferences);
> if (!persistedPrefNames.containsAll(portletXmlPrefNames)) {
> internalStore();
> }
> ...
> private Set getPreferenceNames(InternalPortletPreference[] prefs) {
> Set prefNames = new HashSet();
> for (int i = 0; i < prefs.length; i++) {
> prefNames.add(prefs[i].getName());
> }
> return prefNames;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Reopened: (PLUTO-487) PortletPreferencesImpl should not
store the preferences every time it is instantiated
Posted by Eric Dalquist <er...@doit.wisc.edu>.
Craig,
Sorry I missed the branch. I'll get it applied today or tomorrow.
Thanks for the catch,
-Eric
Craig Doremus (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/PLUTO-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Craig Doremus reopened PLUTO-487:
> ---------------------------------
>
>
> This fix needs to be applied to trunk and 2.0-refactoring branch.
>
>
>> PortletPreferencesImpl should not store the preferences every time it is instantiated
>> -------------------------------------------------------------------------------------
>>
>> Key: PLUTO-487
>> URL: https://issues.apache.org/jira/browse/PLUTO-487
>> Project: Pluto
>> Issue Type: Improvement
>> Components: portlet container
>> Affects Versions: 2.0.0, 2.0-refactoring
>> Environment: Tomcat 5.5.26
>> Reporter: Nikita Dubrovsky
>> Assignee: Eric Dalquist
>> Fix For: 2.0.0, 1.1.6
>>
>> Attachments: P487-1.1.x-Rev656347.diff
>>
>>
>> In Pluto 1.1.5, the constructor of org.apache.pluto.internal.impl.PortletPreferencesImpl calls internalStore() every time. It would be better to only store the preferences when it is actually necessary -- I believe this is the case only when the prefs from portlet.xml have not yet been stored:
>> ...
>> Set portletXmlPrefNames = getPreferenceNames(defaultPreferences);
>> Set persistedPrefNames = getPreferenceNames(storedPreferences);
>> if (!persistedPrefNames.containsAll(portletXmlPrefNames)) {
>> internalStore();
>> }
>> ...
>> private Set getPreferenceNames(InternalPortletPreference[] prefs) {
>> Set prefNames = new HashSet();
>> for (int i = 0; i < prefs.length; i++) {
>> prefNames.add(prefs[i].getName());
>> }
>> return prefNames;
>> }
>>
>
>