This page describes how to add a custom portlet to the WSRP provider portlet installed by WSRP4J.
$TOMCAT_HOME/webapps
, copy the portlet registration from pluto/WEB-INF/data/portletentityregistry.xml
into wsrp/WEB-INF/data/portletentityregistry.xml
For example, a hello world portlet installed on a fresh copy of Pluto might look like this:
<application id="6"> <definition-id>helloworld</definition-id> <portlet id="0"> <definition-id>helloworld.helloworld</definition-id> </portlet> </application> |
persistence/portlets
that will tell the Swing consumer about the new portlet. First, note the application and portlet id from step 2. Then, from the driver/SwingConsumer
directory, copy an existing portlet config file:
persistence/portlets/org.apache.wsrp4j.consumer.driver.WSRPPortletImpl@WSRP4J_0_1.xml
topersistence/portlets/org.apache.wsrp4j.consumer.driver.WSRPPortletImpl@WSRP4J_APPID_PORTLETID.xml
persistence/portlets/org.apache.wsrp4j.consumer.driver.WSRPPortletImpl@WSRP4J_6_0.xml
include this:
<Portlet> <portlet-key> <portlet-handle>6.0</portlet-handle> <producer-id>1</producer-id> </portlet-key> <parent-handle>6.0</parent-handle> </Portlet> |
persistence/pages/org.apache.wsrp4j.consumer.app.driver.PageImpl@WSRP4JTestPortlets.xml
file and add an entry for your portlet. For example, the above example portlet would require this addition:
<portlet-key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:org.apache.wsrp4j.consumer.driver.PortletKeyImpl"> <portlet-handle>6.0</portlet-handle> <producer-id>1</producer-id> </portlet-key> |