On 7/31/06, Edgar Poce <[EMAIL PROTECTED]> wrote:
Hi Aaron,
On 7/31/06, Aaron Evans <[EMAIL PROTECTED]> wrote:
> On 7/29/06, Edgar Poce <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I'm working on a project in which I have a test server and a
> > production server. In the current configuration the psml files are
> > stored in filesystem and the jetspeed schema in a database. When I
> > migrate the production server to the latest stable version I'd like to
> > override only a subset of information of the portal. I'd like to
> > override only the psml files and the portletpreferences not tied to an
> > specific user.
> >
>
> So if they are not tied to any particular user, then where are they
> defined? PSML? Portlet.xml?
I didn't know the portlet preferences could be stored in the psml.
thanks for the tip.
I thought that the preferences stored with the following code would be
shared among all users, based on some tests it seems they are shared
even when they are not defined neither in the psml nor the
portlet.xml. Are they shared?:
Yes. BUT, this is going to change as of 2.1. Preferences ought to be
user specific in this case, but with the current J2 implementation
they are not.
public void processAction(ActionRequest req, ActionResponse res)
throws PortletException, java.io.IOException {
log.info("updating jmx invoker");
if (req.getParameter("save") != null) {
PortletPreferences prefs = req.getPreferences();
PreferenceKey[] prefsEnum = PreferenceKey.values();
for (PreferenceKey pref : prefsEnum) {
prefs.setValue(pref.getName(),
req.getParameter(pref
.getName()));
}
prefs.store();
}
I'm probably missing something important, so I'll try to explain what
I'm trying to do.
I'm working in a very simple portlet that invokes a given operation on
a jmx MBean. The administrator has the right to add pages, add the
portlet and specify the MBean and the operation through the user
interface in edit mode. I'd like to move to production the new pages
generated by the administrator and the preferences that define the
target MBean.
AFAIK I can't set the preferences in the psml through the web
interface, am I right?, so, my problem is that I'd like to find the
way to let the admin to add pages, portlets and preferences and be
able to move them from one environment to the other.
Yes, I believe you are correct, you can't set the preferences in the
PSML via the web interface. However, I wouldn't be surprised if they
were to add this capability. Perhaps you should log the enhancement in
JIRA.
I see what you are getting at though. You want to create portlet
"state" via preferences in the test environment, test and then roll
those changes to production. This is an interesting case and similar
to the challenges with CMS systems. ie. you're not just testing code,
but in a way, "content" for your portlet that you then need to move to
prod.
Unfortunately, I'm not sure how to best accomplish this then. If the
admin absolutely needs to be able to do it via the web interface and
you can't just hand-edit the PSML preferences, then I'm really not
sure. Perhaps one of the J2 experts will chime in...
thanks for your help,
edgar
> In these cases, when you update your PSML
> pages and/or your portlet application with the portlet.xml, then the
> preferences defined there should become the defaults I would think.
>
> > I have no problems to migrate the psml files, but I still didn't find
> > the way to make an sql script to copy only the portlet preferences.
> >
> > making an sql script is the right approach? anyone has experience in
> > such use case and like to share it? in case making an sql script is a
> > good choice, could anyone give me some tips?, which tables are
> > involved?, a brief description of the data model involved in my use
> > case would be great
> >
> > thanks in advance,
> > Edgar
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]