We are working on a uPortal REST API that
will read or update portlet preferences. We want to build web
components that allow administrators and users to save
preferences for web components.
For example, users can save many weather
locations and temperature (C or F) preferences in the current
Weather Portlet. The
Calendar Portlet allows the administrator to set default
calendars that all users can see, and it allows users to
select which calendars they want to see and add their own
We are working to replace the Weather and
Calendar portlets with web components but we don't want to
create our own database tables to save preferences when
uPortal already has tables for portlet preferences.
In order to use the existing code for
portlet preferences we need the fname of the portlet, and
optionally, the user name. We can get the user name easily. We
could hard-code the fname of the web component (actually an
Advanced CMS portlet) in the code that calls the new API, but
we’d rather let the web component discover it. Getting the
fname from the <section> element sounds like it would
work. If you have better ideas, please let us know.
I’m including a prior email to Drew, and
I believe you're looking for
PortletEntityPreferencesImpl. The former is for
"publication-level" preferences (manage the defaults...
applies to everyone), the later is for per-user values.
There's a chance I'll be submitting a
REST API to manipulate these in a PR.
On 2/11/19 7:39 PM, Lauren Anderson
I looked at the uPortal APIs but I
didn’t see any that read or update portlet preferences in
the uPortal database. Has anyone built one? If not, any
suggestions for how I would do that? Having a place to store
user preferences for portlets/web components is really
useful, as is done for the Weather portlet right now
(location, temperature units).