uPortal 3.0.0-M1 Portlet Publishing and Subscribing

Portlet publishing

To publish a portlet that has already been deployed by the uPortal 3 deployment tool you need to make the following steps:

  1. If the portlet being published belongs to an existing portlet application definition - skip this step.
    Create a new portlet application definition in the table UP_PORT_APPL_DEF with the ID of the correspondent portlet application deployment.
  2. Create a new portlet definition in the table UP_PORT_DEF with the correspondent portlet deployment ID,
    ID of the portlet application definition it belongs to,
    definition state attributes like publish/approval dates and approver/publisher IDs.
  3. Add portlet definition preferences and publish parameters (if necessary) to the tables UP_PORT_PREF_NM and UP_PORT_PREF_VL.
    Specify the preference type definition, object owner ID - the portlet definition ID, preference/parameter name
    with the attribute read-only=Y/N in the table UP_PORT_PREF_NM.
    Add definition preference/parameter values to the table UP_PORT_PREF_VL.

Portlet subscribing

Once the new portlet definition is added it can be used for subcribing to the portlet. This process requires a new portlet entity and
at least one new portlet window to be created. The sequence of steps below describes how it could be done:

  1. If the portlet entity being created belongs to an existing portlet application entity - skip this step.
    Create a new portlet application entity in the table IP_PORT_APPL_ENT with the ID of the correspondent portlet application definition.
  2. Create a new portlet entity in the table UP_PORT_ENT with the correspondent portlet definition ID, user ID and
    ID of the portlet application entity it belongs to.
  3. Add portlet entity preferences and subscribe parameters (if applicable) to the tables UP_PORT_PREF_NM and UP_PORT_PREF_VL.
    Specify the preference type entity, object owner ID - the portlet entity ID, preference/parameter name
    with the attribute read-only=Y/N in the table UP_PORT_PREF_NM.
    Add entity preference/parameter values to the table UP_PORT_PREF_VL.
  4. Create a new portlet window in the table UP_PORT_WIN with the correspondent portlet entity ID, user ID,
    initial http://www.jcp.org/aboutJava/communityprocess/review/jsr168/ window state and portlet mode.
  5. Include the created window ID in the user layout sample $UPORTAL3_HOME/webpages/stylesheets/uP2/adaptedLayoutSample.xml
    as a channel attribute, for an example:
    <channel ID="12-6" portletWindowId="1"...

Example

Portlet deployment

M1 comes with one portlet that can be deployed by running the 'ant deployPortletApp' target with no arguments. This will deploy the Pluto TestSuite portlet.

Portlet publishing

  1. Example Application Definition Creation
    INSERT INTO UP_PORT_APPL_DEF VALUES (2, 'testsuite');
    UPDATE UP_SEQ SET SEQ_VL=2 WHERE SEQ_NM='portletApplDef';
    
  2. Example Definition Creation
    INSERT INTO UP_PORT_DEF VALUES(2, 'testsuite.TestPortlet1', null, null, null, null, 2);
    UPDATE UP_SEQ SET SEQ_VL=3 WHERE SEQ_NM='portletDef';
    
  3. No Preferences Example

Portlet subscribing

  1. Example Application Entity Creation
    INSERT INTO UP_PORT_APPL_ENT VALUES (2, 1, 2);
    UPDATE UP_SEQ SET SEQ_VL=2 WHERE SEQ_NM='portletApplEntity';
    
  2. Example Entity Creation
    INSERT INTO UP_PORT_ENT VALUES (3, 1, 2, 2);
    UPDATE UP_SEQ SET SEQ_VL=3 WHERE SEQ_NM='portletDef';
    
  3. Example Window Creation
    INSERT INTO UP_PORT_WIN VALUES (4, 1, 3, 'view', 'normal');
    UPDATE UP_SEQ SET SEQ_VL=3 WHERE SEQ_NM='portletWindow';
    
  4. Example adaptedLayoutSample.xml
    ...
    <channel ID="2" portletWindowId="4" typeID="-1" hidden="false" editable="false"
    ...