You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by LouisV <lv...@yahoo.com> on 2010/08/03 16:20:56 UTC

Existing PSML page updates

I am interested in finding out the best way to handle updates to existing
PSML pages (we are currenty using folder storage for these opposed to
storing them in a database) for our portlet application built on Jetspeed
2.2.0.  As far as I understand, the template PSML pages are copied to user
folders the first time a user logs into Jetspeed and each portlet in the
PMSL is assigned a unique fragment identifier (used for indexing into the
database for stored preferences?).  Eventually, we envision changing some of
our template pages (e.g. add/remove portlets on a page) when we upgrade the
portlet application, but we'd prefer to also retain any/all user preferences
that users may have made to those pages.  What is the best way to handle
updates to the template pages so that existing users can/will get these
updates after an upgrade of our portlet application?

Thanks in advance.
-- 
View this message in context: http://old.nabble.com/Existing-PSML-page-updates-tp29335997p29335997.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Existing PSML page updates

Posted by David Sean Taylor <d....@onehippo.com>.
On Wed, Aug 4, 2010 at 10:43 AM, LouisV <lv...@yahoo.com> wrote:
>
> My original question was a bit vague.
>
> We have several different portlet applications (PA).  Each PA has a set of
> folders/pages it defines. We are using the folder-based pages and not the
> database.  We have a common way for users to configure each PA’s pages at
> the click of a button using the Jetspeed APIs.  Users can’t edit these pages
> but they can change each portlet’s preferences on these pages.  When a PA
> comes out with a new release it’s likely the set of pages for the PA needs
> to be updated (new pages, portlets added/removed from existing pages, pages
> removed).  Ideally, we’d be able to do something like delete the existing
> user’s page for the PA and copy the new PA’s template pages.  However, we
> don’t want to lose the user’s preferences for any portlets that previously
> existed on pages that were just updated. It’s not an issue for new pages or
> deleted pages.  We want to do this without the user having to do anything

You should not lose user preferences for a page that is updated, as
long as the fragment id stays the same
If you change the fragment id in the PSML, then yes, the preferences
will become orphaned, and the user's preferences will be lost
Best to not change ids
If you are going to create entirely new pages, which happen to have
the same portlets and user preferences as the previous page, then it
might help be easiest to reuse the fragment ids of the old page and
match them to your new fragment definitions. If you have lots of
pages, best to do this programmatically with the Jetspeed Preferences
API...

> possibly at login time, or at server startup time, or even through some
> process we develop that runs when the server is down (like part of our
> installer).  Any ideas are much appreciated.  We don’t want to orphan any
> preference settings in the database either.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Existing PSML page updates

Posted by LouisV <lv...@yahoo.com>.
My original question was a bit vague.

We have several different portlet applications (PA).  Each PA has a set of
folders/pages it defines. We are using the folder-based pages and not the
database.  We have a common way for users to configure each PA’s pages at
the click of a button using the Jetspeed APIs.  Users can’t edit these pages
but they can change each portlet’s preferences on these pages.  When a PA
comes out with a new release it’s likely the set of pages for the PA needs
to be updated (new pages, portlets added/removed from existing pages, pages
removed).  Ideally, we’d be able to do something like delete the existing
user’s page for the PA and copy the new PA’s template pages.  However, we
don’t want to lose the user’s preferences for any portlets that previously
existed on pages that were just updated. It’s not an issue for new pages or
deleted pages.  We want to do this without the user having to do anything
possibly at login time, or at server startup time, or even through some
process we develop that runs when the server is down (like part of our
installer).  Any ideas are much appreciated.  We don’t want to orphan any
preference settings in the database either.

Thanks again, in advance,

-- 
View this message in context: http://old.nabble.com/Existing-PSML-page-updates-tp29335997p29349197.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Existing PSML page updates

Posted by David Sean Taylor <d....@onehippo.com>.
On Tue, Aug 3, 2010 at 7:20 AM, LouisV <lv...@yahoo.com> wrote:
>
> I am interested in finding out the best way to handle updates to existing
> PSML pages (we are currenty using folder storage for these opposed to
> storing them in a database) for our portlet application built on Jetspeed
> 2.2.0.  As far as I understand, the template PSML pages are copied to user
> folders the first time a user logs into Jetspeed and each portlet in the
> PMSL is assigned a unique fragment identifier (used for indexing into the
> database for stored preferences?).  Eventually, we envision changing some of
> our template pages (e.g. add/remove portlets on a page) when we upgrade the
> portlet application, but we'd prefer to also retain any/all user preferences
> that users may have made to those pages.  What is the best way to handle
> updates to the template pages so that existing users can/will get these
> updates after an upgrade of our portlet application?

New portlets can have default preferences stored on the fragment when
redeploying the page, for example:

    <fragment id="dp-10" type="portlet"
name="webcontent::IFramePortlet" decorator="gray-gradient-noborder">
      <preference name="SRC">
        <value>http://www.apache.org/</value>
      </preference>
    </fragment>

The portlet can of course programmatically pick up any new preference
added over time.

Once a user saves a preference, that preference is associated with
that user, and the preference always overrides the default setting,
even if you redeploy the portlet or page. If a user is not allowed to
override and save a preference, then the program will always pick up
the default preference (either from the page definition, or from the
portlet definition)

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org