Manually Patching uPortal 3 to support Toro Portlets

Knowledge Base: Academus
Updated: July 30, 2008
How do I manually patch uPortal 3 to support Toro portlets?

Manually patching uPortal 3

Add Facade to allow Toro components access to uPortal APIs cross-context.

Edit uportal-impl/src/main/resources/properties/contexts/applicationContext.xml and add:

<bean id="uportal-academus-facade-invoking-bean" 
    class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <property name="staticMethod" 
        value="net.unicon.academus.api.uportal.UPortalAcademusFacade.register"/>
</bean>

Add Toro dependencies to uportal-impl module

Add these to the <dependencies> element in uportal-impl/pom.xml

<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>academus-api</artifactId>
    <version>${toro.version}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>uportal-academus-api</artifactId>
    <version>${toro.version}</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>sso-callback-servlet</artifactId>
    <version>${toro.version}</version>
    <scope>runtime</scope>
</dependency>

Add the toro dependencies to the uPortal EAR

Edit uportal-ear/pom.xml and add the following to the <dependencies> element

<dependency>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-briefcase-portlet</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-gateway-portlet</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-messaging-portlet</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-permissions-portlet</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-web-content-portlet</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>portlets-common-webapp</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>blojsom</artifactId>
    <version>${toro.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>sso-authentication-cache</artifactId>
    <version>${toro.version}</version>
    <type>jar</type>
</dependency>
<dependency>
    <groupId>net.unicon.toro</groupId>
    <artifactId>academus-api</artifactId>
    <version>${toro.version}</version>
    <type>jar</type>
</dependency>

And add the following to the <modules> element

<webModule>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-briefcase-portlet</artifactId>
    <bundleFileName>toro-briefcase-portlet.war</bundleFileName>
    <contextRoot>/toro-briefcase-portlet</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-gateway-portlet</artifactId>
    <bundleFileName>toro-gateway-portlet.war</bundleFileName>
    <contextRoot>/toro-gateway-portlet</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-messaging-portlet</artifactId>
    <bundleFileName>toro-messaging-portlet.war</bundleFileName>
    <contextRoot>/toro-messaging-portlet</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-permissions-portlet</artifactId>
    <bundleFileName>toro-permissions-portlet.war</bundleFileName>
    <contextRoot>/toro-permissions-portlet</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro.portlets-overlay</groupId>
    <artifactId>toro-web-content-portlet</artifactId>
    <bundleFileName>toro-web-content-portlet.war</bundleFileName>
    <contextRoot>/toro-web-content-portlet</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro</groupId>
    <artifactId>blojsom</artifactId>
    <bundleFileName>toro-blojsom.war</bundleFileName>
    <contextRoot>/toro-blojsom</contextRoot>
</webModule>
<webModule>
    <groupId>net.unicon.toro</groupId>
    <artifactId>portlets-common-webapp</artifactId>
    <bundleFileName>toro-portlets-common.war</bundleFileName>
    <contextRoot>/toro-portlets-common</contextRoot>
</webModule>

Add the SSO Gateway Callback Servlet

Edit uportal-war/src/main/webapp/WEB-INF/web.xml and add the following in their appropriate sections.

<servlet>
    <servlet-name>SsoCallback</servlet-name>
    <servlet-class>net.unicon.academus.apps.sso.SsoCallbackServlet</servlet-class>
    <load-on-startup>4</load-on-startup>
    <init-param>
        <!-- This path should map back to the Login servlet -->
        <param-name>unauthenticatedRedirectUrl</param-name>
        <param-value></param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>SsoCallback</servlet-name>
    <url-pattern>/ssoCallback</url-pattern>
</servlet-mapping>