On Mar 20, 2007, at 12:30 PM, Melchior, Joris wrote:
Hi Everyone,
It's my understanding that Preferences can be set at different levels.
1) Global in portlet.xml.
2) Portlet instance when added in fragment descriptor in .psml file.
3) User level when having a portlet in edit mode for example.
I was wondering if there was a way in Jetspeed 2 to set preferences at
the Portlet instance level in a programmatic way. This way an admin
could change these on the fly and other users would see this as well
unless they change the Preference at the user level. Anybody know if
there is a part of the API that can be used for this and if so which
part that would be?
Thanks,
Joris Melchior.
We had a discussion on this on the jetspeed-dev list
There is related issue:
http://issues.apache.org/jira/browse/JS2-634
for supporting PLT.A.3 (from the spec) "edit_defaults" mode from the
portal administration
From the portlet api perspective, there is only one way to set
preferences, and that is for the current user
To support your case, programmatically, it would have to be Jetspeed
specific involving using a Jetspeed service (PreferencesProvider)
or going through the Java Prefs API directly (I don't want to
recommend this second solution, although I see it in quite a few places,
because it is the implementation)
And then doing something like:
prefNodePath =
MutablePortletEntity.PORTLET_ENTITY_ROOT + "/" + getId() +"/"+
NO_PRINCIPAL +"/"
+ PrefsPreference.PORTLET_PREFERENCES_ROOT;
to get the path to defaults for an instance
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]