Portal Service

bean id: PortalServices

Description

Allows the publication of services to portlet applications that are deployed within the Jetspeed Portal. Services and components defined within Jetspeed's Spring ApplicationContext can be mapped into the PortalServices via a java.util.Map. Services are made available to individual portlet applications by adding service entries to the WEB-INF/jetspeed-portlet.xml extended deployment descriptor.

This an example of making the ../PortletRegistryComponent available to a portlet application:

<portlet-app id="security" version="1.0" 
    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" 
    xmlns:js="http://portals.apache.org/jetspeed" 
    xmlns:dc="http://www.purl.org/dc">
   <js:services>
     <js:service name='PortletRegistryComponent'/>
   </js:services>
</portlet-app>

NOTE: By default your portlet application will probably NOT have the exteneded deployment descriptor bey default:

Jetspeed places services into PortletContext based on what services are detailed in the extended deployment descriptor. So, to access the PortletRegistryComponent service in your portlet, invoke javax.portlet.PortletContext.getAttribute("cps:PortletRegistryComponent");

Default Configuration

<bean id="PortalServices" ding 
      class="org.apache.jetspeed.services.JetspeedPortletServices" >
  <constructor-arg>
    <map>
      <entry key="PortletRegistryComponent">
        <ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistryComponent" />
        </entry>
        <entry key="PAM">
          <ref bean="PAM" />
        </entry>                  
    </map>
  </constructor-arg>
</bean>

Jetspeed2/PluggableEngineComponents/CoreEngineComponents/PortalServices (last edited 2009-09-20 23:46:27 by localhost)