Jetspeed

Essentials

Get Involved

Documentation

Components

Configuration common to most portlets


Description

Common elements

Registery Entry examples


Element: portlet-entry

Definition of a portlet.

Attribute Name Description
name Name of portlet. This name MUST be unique
type Type of portlet-entry
Allowable values
abstract Portlet is one which cannot be created directly. It acts as a portlet template, useful for defining common properties for a group of related portlets.
instance Portlet is the basic entry. It should provide all the necessary information to create the portlet, at least the classname.
ref Portlet is based on an existing <portlet-entry> which can be of any type, including other ref entries. The engine will follow all refs until it finds either an abstract or instance entry, override all parameters found in the these definitions by those in the ref definition's, and then create the portlet using the combined definitions
hidden
Allowable values
false
true
application Portlet will be displayed in a full screen, i.e. the only portlet displayed.
Allowable values
false
true


Element: meta-info

Typically optional information that describe the item (portlet, parameter, ...). Meta-info is used by the Jetspeed customizer. The information is also available to some portlet types.

Element: title

Title of item (portlet, parameter, ...)

Parent Element Default
portlet-entry Value of portlet-entry's name attribute
parameter Value of parameter's name attribute

Element: description

Description of item (portlet, parameter, ...). Their is no default description.


Element: icon

Path and file name of icon relative to <jetspeed_home>



Element: classname

Java class uses to generate content.


Element: parameter

The hidden attribute controls whether the customizer will display the parameter.

This element is optional.

Attribute Name Description
name Name of portlet, parameter,...
value Default/initial value
type Data type of value. When this attribute is not present any character string is accepted
Allowable values
boolean Only true or false are allowed as a value for this parameter
hidden
Allowable values
false
true
Parameter Name Description
showDescription Should the portlet show the item descriptions.
If not present, Default: true for HTML, false for WML
ValueDescription
trueItem Description is displayed
falseItem Description is NOT displayed
_display Initial display state of portlet.
If not present, Default: normal
ValueDescription
closedPortlet is closed and not visible
minimizedPortlet is minimized. Only title is displayed
normalPortal and content is displayed


Element: url

Since the configuration file is an XML file, some character must be represented using XML entities.

Character XML Entity
& &amp;
< &lt;
> &gt;
Allowable Protocols Description
http:// Standard HTTP protocol is used to retrieve file or data
File is local and path is relative to <jetspeed_home>

Good URLs:

<url>http://jakata.apache.org/jetspeed</url>
Basic URL
<url>http://search.yahoo.com/bin/search?p=jetspeed</url>
1 Parameter passed
<url>http://search.yahoo.com/search?p=jetspeed&amp;n=100</url>
2 Parameter passed

Bad URLs:

<url>index.html</url>
No protocol, http:// or hostname
<url>http://search.yahoo.com/search?p=jetspeed&n=100</url>
Contains & instead of &amp;.


Element: security

Used by customizer to limit access to this item (portlet, parameter,...)

Attribute Name Description
role Role required by user to select this item


Element: media-type

Media types that can display and configure portal.

Media types are define in <jetspeed_home>/WEB-INF/conf/media.xreg

Attribute Name Description
ref Media type.


Example of Registry Entry

Abstract Portal Entry

<portlet-entry name="RSS" hidden="false" type="abstract" application="false">
    <meta-info>
        <title></title>
        <description></description>
    </meta-info>
    <classname>org.apache.jetspeed.portal.portlets.NewRSSPortlet</classname>
    <parameter name="stylesheet" value="/WEB-INF/xsl/rss.xsl" hidden="false">
        <meta-info>
            <title></title>
            <description></description>
        </meta-info>
        <security role="admin"/>
    </parameter>
    <media-type ref="html"/>
    <media-type ref="wml"/>
</portlet-entry>

Reference Portal Entry

<portlet-entry name="RSS" hidden="false" type="ref" application="false">
    <meta-info>
        <title></title>
        <description></description>
    </meta-info>
    <parameter name="" value="" hidden="false">
        <meta-info>
            <title></title>
            <description></description>
        </meta-info>
        <security role=""/>
    </parameter>
</portlet-entry>


Example of use in Portal


Questions and possible problems to be investigated (version 1.3a1)

  • Add descriptions and review.
  • Add common parameters, i.e. bgcolor and display.screen.
  • Complete examples
  • How is the application attribute of <portlet-entry> used?
  • How is the hidden attribute of <portlet-entry> used?
  • How is the hidden attribute of <parameter> used?
  • Verify definition/implementation of <portlet-entry>.



Copyright © 1999-2001, Apache Software Foundation