portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ate Douma <...@douma.nu>
Subject Re: How to start Services using MyFaces Bridge / Jetspeed 2
Date Tue, 20 Nov 2007 21:54:40 GMT
Abiodun Okusolubo wrote:
> Hello All,
> I need assistance in creating User Management Portlet using MyFaces 
> Bridge /Jetspeed 2. Unfortunately, following the examples given, the 
> Services seems not to start at all. Please
> I'll be looking forward to reply on how to get this feat sorted. Thanks 
> in advance.

To make use of the predefined Jetspeed Portal Services like the UserManager (see the available
list of services *available* in 
WEB-INF/assembly/jetspeed-services.xml) you need to do two things:

a) provide a jetspeed-portlet.xml in your portlet application under WEB-INF containing something
like:

   <portlet-app version="1.0"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:js="http://portals.apache.org/jetspeed"
     xmlns:dc="http://www.purl.org/dc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/jetspeed-portlet.xsd">

     <js:services>
       <js:service name='UserManager'/>
     </js:services>

   </portlet-app>

   Only when Jetspeed finds this extended deployment descriptor it will provide access to
the referenced services.
   Note: the extended deployment descriptor jetspeed-portlet.xml can be used to provide other
type of jetspeed specific meta-data as well.

b) The referenced services are (only) then provided using an attribute in the PortletContext
as defined in the jetspeed-api, 
org.apache.jetspeed.CommonPortletServices, like:

   UserManager userManager = (UserManager)portletContext.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);

HTH,

Ate

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


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


Mime
View raw message