Hi,
I'm using NWalsh's stylesheets and docbook and FOP and during the rendering to pdf I get this error:
[java] [ERROR] inline formatting objects cannot be directly under flow
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[java] at org.apache.fop.apps.Driver.render(Driver.java:457)
[java] at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69)
[java] at org.apache.fop.apps.Fop.main(Fop.java:19)
[java] Java Result: 2
I've attached my FOP-- are there any easy ways to see where FOP has gone bad besides trying to cut and paste away at my docbook until the problem goes away? I've also used xmllint to make sure it has all references.
Thanks, Jason
<?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" line-height="normal" text-align="justify" font-size="10pt" font-family="serif" language="en"><fo:layout-master-set><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="blank"><fo:region-body margin-top="0.5in" margin-bottom="0.5in" display-align="center" region-name="blank-body"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-blank"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-blank"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-first"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-odd"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-even"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-first"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-odd"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-even"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-first"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-odd"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-even"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-first"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-odd"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-even"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-first"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-odd"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-even"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-first"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-odd"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-even"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="blank-draft"><fo:region-body margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-blank"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-blank"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-first-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-odd-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="titlepage-even-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-first-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-odd-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="lot-even-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-first-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-odd-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="front-even-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-first-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-odd-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="body-even-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-first-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-odd-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="back-even-draft"><fo:region-body column-count="1" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-first-draft"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-first"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-first"/></fo:simple-page-master><fo:simple-page-master margin-right="1in" margin-left="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-odd-draft"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-odd"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-odd"/></fo:simple-page-master><fo:simple-page-master margin-left="1in" margin-right="1in" margin-bottom="0.5in" margin-top="0.5in" page-height="11in" page-width="8.5in" master-name="index-even-draft"><fo:region-body column-count="2" margin-top="0.5in" margin-bottom="0.5in" background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before display-align="before" extent="0.4in" region-name="xsl-region-before-even"/><fo:region-after display-align="after" extent="0.4in" region-name="xsl-region-after-even"/></fo:simple-page-master><fo:page-sequence-master master-name="titlepage"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="titlepage-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="titlepage-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="titlepage-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="lot"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="lot-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="lot-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="lot-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="front"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="front-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="front-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="front-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="body"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="body-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="body-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="body-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="back"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="back-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="back-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="back-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="index"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/><fo:conditional-page-master-reference page-position="first" master-reference="index-first"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="titlepage-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="titlepage-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="titlepage-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="titlepage-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="lot-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="lot-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="lot-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="lot-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="front-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="front-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="front-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="front-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="body-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="body-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="body-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="body-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="back-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="back-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="back-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="back-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="index-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank-draft"/><fo:conditional-page-master-reference page-position="first" master-reference="index-first-draft"/><fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd-draft"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master></fo:layout-master-set><fo:page-sequence initial-page-number="1" master-reference="titlepage" hyphenate="true" id="N10003" language="en" format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"/></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"/></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block><fo:block><fo:block font-family="sans-serif" font-weight="bold" font-size="24.8832pt" text-align="center" space-before="18.6624pt"><fo:block hyphenate="false" keep-with-next.within-column="always">GridSphere Portlet Reference Guide</fo:block></fo:block></fo:block><fo:block><fo:block break-after="page"/><fo:block font-size="14.4pt" font-family="sans-serif" font-weight="bold"><fo:block>GridSphere Portlet Reference Guide</fo:block></fo:block><fo:block font-size="10pt">Copyright <fo:inline font-family="serif">©</fo:inline> 2003 GridLab Project</fo:block></fo:block><fo:block break-after="page"/></fo:block></fo:flow></fo:page-sequence><fo:page-sequence master-reference="lot" format="i" hyphenate="true" language="en"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>GridSphere Portlet Reference Guide</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>GridSphere Portlet Reference Guide</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block space-before.minimum="0.5em" space-before.optimum="1em" space-before.maximum="2em" space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em" id="toc...N10003"><fo:block><fo:block><fo:block font-family="sans-serif" font-weight="bold" font-size="17.28pt" margin-left="-4pc" space-after="0.5em" space-before.maximum="2em" space-before.optimum="1.5em" space-before.minimum="1em">Table of Contents</fo:block></fo:block><fo:block/></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-intro">1. Portlet Concepts</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-intro"><fo:page-number-citation ref-id="portlet-intro"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-lifecycle">2. Portlet Lifecycle</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-lifecycle"><fo:page-number-citation ref-id="portlet-lifecycle"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-lifecycle"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N100F0">Portlet Action Methods</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N100F0"><fo:page-number-citation ref-id="N100F0"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10177">Portlet Render Methods</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10177"><fo:page-number-citation ref-id="N10177"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-descriptor">3. Portlet Descriptor</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-descriptor"><fo:page-number-citation ref-id="portlet-descriptor"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-descriptor"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10245">The Application Portlet Definition</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10245"><fo:page-number-citation ref-id="N10245"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="concrete.portlet">The Concrete Portlet Definition</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="concrete.portlet"><fo:page-number-citation ref-id="concrete.portlet"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-objects">4. Core Portlet API</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-objects"><fo:page-number-citation ref-id="portlet-objects"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-objects"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet.objects.config">PortletConfig</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet.objects.config"><fo:page-number-citation ref-id="portlet.objects.config"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10383">PortletContext</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10383"><fo:page-number-citation ref-id="N10383"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N103D8">PortletRequest</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N103D8"><fo:page-number-citation ref-id="N103D8"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N1047F">PortletResponse</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N1047F"><fo:page-number-citation ref-id="N1047F"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N1049F">PortletSession</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N1049F"><fo:page-number-citation ref-id="N1049F"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N104AB">PortletSettings</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N104AB"><fo:page-number-citation ref-id="N104AB"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N104BB">PortletData</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N104BB"><fo:page-number-citation ref-id="N104BB"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-layout">5. Portlet Layout Framework</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-layout"><fo:page-number-citation ref-id="portlet-layout"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-layout"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N104D5">Portlet Layout Components</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N104D5"><fo:page-number-citation ref-id="N104D5"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10513">Specifying a Layout</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10513"><fo:page-number-citation ref-id="N10513"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-services">6. Portlet Service Framework</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-services"><fo:page-number-citation ref-id="portlet-services"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-services"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10562">Portlet Service Architecture</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10562"><fo:page-number-citation ref-id="N10562"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-services-descriptor">Portlet Services Descriptor</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-services-descriptor"><fo:page-number-citation ref-id="portlet-services-descriptor"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N105FE">Core Portlet Services</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N105FE"><fo:page-number-citation ref-id="N105FE"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-service-example">Portlet Service Example</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-service-example"><fo:page-number-citation ref-id="portlet-service-example"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="48pt" id="toc.N10003.portlet-service-example"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N1062B">Create service definition</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N1062B"><fo:page-number-citation ref-id="N1062B"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10649">Create service interface</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10649"><fo:page-number-citation ref-id="N10649"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N1066B">Create service implementation</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N1066B"><fo:page-number-citation ref-id="N1066B"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N1069D">Access service from portlet</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N1069D"><fo:page-number-citation ref-id="N1069D"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N106A7">User Portlet Service Example</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N106A7"><fo:page-number-citation ref-id="N106A7"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="48pt" id="toc.N10003.N106A7"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N106AC">Create user service definition</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N106AC"><fo:page-number-citation ref-id="N106AC"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N106C5">Edit service interface</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N106C5"><fo:page-number-citation ref-id="N106C5"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N106CD">Create user service implementation</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N106CD"><fo:page-number-citation ref-id="N106CD"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10710">Access the user service from a portlet</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10710"><fo:page-number-citation ref-id="N10710"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="service.testing">Portlet Service Testing</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="service.testing"><fo:page-number-citation ref-id="service.testing"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-persistence">7. Portlet Persistence</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-persistence"><fo:page-number-citation ref-id="portlet-persistence"/></fo:basic-link></fo:inline></fo:block><fo:block start-indent="24pt" id="toc.N10003.portlet-persistence"><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10753">Creating Persistent Objects</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10753"><fo:page-number-citation ref-id="N10753"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10758">The Persistence Manager</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10758"><fo:page-number-citation ref-id="N10758"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="portlet-resources">8. Additional Portlet Resources</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="portlet-resources"><fo:page-number-citation ref-id="portlet-resources"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence master-reference="lot" format="i" hyphenate="true" language="en"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>GridSphere Portlet Reference Guide</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>GridSphere Portlet Reference Guide</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="lot...figure...N10003"><fo:block><fo:block><fo:block font-family="sans-serif" font-weight="bold" font-size="17.28pt" margin-left="-4pc" space-after="0.5em" space-before.maximum="2em" space-before.optimum="1.5em" space-before.minimum="1em">List of Figures</fo:block></fo:block><fo:block/></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10047">1.1. Portlet Web Applications and the Portlet Lifecycle</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10047"><fo:page-number-citation ref-id="N10047"/></fo:basic-link></fo:inline></fo:block><fo:block last-line-end-indent="-24pt" end-indent="24pt" text-align-last="justify"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="N10567">6.1. Portlet Service Architecture UML</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader keep-with-next.within-line="always" leader-alignment="reference-area" leader-pattern-width="3pt" leader-pattern="dots"/> <fo:basic-link internal-destination="N10567"><fo:page-number-citation ref-id="N10567"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence master-reference="body" hyphenate="true" id="portlet-intro" language="en" format="1" initial-page-number="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Concepts</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Concepts</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt" space-before.optimum="10pt" keep-with-next.within-column="always">Chapter 1. Portlet Concepts</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> Portlets are defined as visual components that can be assimilated into portal web pages. Portlets provide "mini-applications" that can either display informational content or provide access to other services. The GridSphere portal allows users to customize their workspace by adding and removing portlets as needed. In addition to standard window states like minimized or maximized, portlets can also provide various "modes". The standard portlet modes are <fo:inline font-style="italic">view</fo:inline>, <fo:inline font-style="italic">edit</fo:inline>, <fo:inline font-style="italic">configure</fo:inline> and <fo:inline font-style="italic">help</fo:inline>. As an example, consider a stock quote portlet that allows users to customize their stock quote information. View mode would display a user's stock information. Help mode provides users with informational content about the stock quote portlet and how to use it. Edit mode allows users to change the list of stocks they are intersted in monitoring. Finally, <fo:inline font-style="italic">configure</fo:inline> mode allows portlet administrators to change persistent settings such as the stock quote service that is contacted. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> In the GridSphere framework, portlets inherit from servlets which are defined in Sun's Servlet Specification. Hence, the GridSphere framework is packaged as a web application that provides a portlet container for managing deployed portlets. Portlets are intended to be administered dynamically and portlet administrators can deploy and undeploy portlets to the container. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> Because portlets extend from servlets, portlets are packaged as web applications according to the Java Servlet Specification as Web ARchive (WAR) files just as any other distributable web application. Within a Portlet Web Application, a portlet descriptor file explained in more detail in the next section, is used to describe the portlet's properties and initialization information. A Portlet definition consists of an application portlet and one or more concrete portlets. Application portlets are defined to be the portlets as servlets where a single instance exists for the duration of the portlet container. A concrete portlet instance is an application portlet parameterized with additional data found in the portlets's deployment descriptor (see next section). For instance, it's possible to provide access to multiple stock quote portlets that may have different configuration settings or allow access to a different set of groups, etc. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The GridSphere framework provides built-in support for access control based upon the Role Based Access Control (RBAC) model. GridSphere uses portlet web applications to define groups. Users may belong to one or more groups (meaning they have access to one or more portlet web applications) and they have a <fo:inline font-style="italic">role</fo:inline> within each group. the four supported roles are <fo:inline font-style="italic">GUEST</fo:inline>, <fo:inline font-style="italic">USER</fo:inline>, <fo:inline font-style="italic">ADMIN</fo:inline> and <fo:inline font-style="italic">SUPER</fo:inline>. A user with the GUEST role will obtain a generic view of the portal suitable to guests while a user that has logged on, will have the USER role and may be able to see the portlet personalized with their settings. A user with the ADMIN role can have access to a portlet's CONFIGURE mode described earlier and presumably configure a portlet's initialization settings. A user possesing the SUPER role can essentially do anything they want to any portlet and is essentially equivalent to having root access in an operating system. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The Portlet API explained in greater detail in <fo:basic-link internal-destination="portlet-objects">Core Portlet API</fo:basic-link> provides a much richer interface for web programming than the standard servlet model. In addition to providing information about the current portlet mode and window state, the API provides access to the portal user including group and role information using the <fo:basic-link internal-destination="portlet-objects">GridSphere access control model</fo:basic-link>. </fo:block> The Portlet Services API described in <fo:basic-link internal-destination="portlet-services">Portlet Service Framework</fo:basic-link> provides a very clean approach for the creation of reusable "services" that perform a set of tasks for a given portlet. Using the portlet API, a service instance can be obtained providing the portlet with additional functionality. <fo:block space-before.minimum="0.5em" space-before.optimum="1em" space-before.maximum="2em" space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em" id="N10047"><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" font-weight="bold" font-size="12pt" hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em" space-after.maximum="0.8em" keep-with-next.within-column="always">Figure 1.1. Portlet Web Applications and the Portlet Lifecycle</fo:block><fo:block><fo:external-graphic src="url(lifecycle.png)" width="auto" height="auto" content-width="auto" content-height="auto"/></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The following inheritance hierarchy describes the relationship between servlets and portlets: <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:list-block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" id="N10051" provisional-distance-between-starts="1.5em"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10052"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:inline font-family="monospace" font-size="0.9em">javax.servlet.http.HttpServlet</fo:inline></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10055"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:inline font-family="monospace" font-size="0.9em">org.gridlab.gridsphere.portlet.Portlet</fo:inline></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10058"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:inline font-family="monospace" font-size="0.9em">org.gridlab.gridsphere.portlet.PortletAdapter</fo:inline></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1005B"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:inline font-family="monospace" font-size="0.9em">org.gridlab.gridsphere.portlet.AbstractPortlet</fo:inline></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1005E"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:inline font-family="monospace" font-size="0.9em">com.mycom.MyPortlet</fo:inline></fo:list-item-body></fo:list-item></fo:list-block> </fo:block> In general to reap the benefits of the GridSphere portlet model, a developer would create a new portlet which subclasses from the <fo:inline font-family="monospace" font-size="0.9em">org.gridlab.gridsphere.portlet.AbstractPortlet</fo:inline> class and implement the lifecycle methods detailed in the next section. </fo:block></fo:flow></fo:page-sequence><fo:page-sequence master-reference="body" hyphenate="true" id="portlet-lifecycle" language="en" format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Lifecycle</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Lifecycle</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt" space-before.optimum="10pt" keep-with-next.within-column="always">Chapter 2. Portlet Lifecycle</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The portlet lifecycle extends the servlet lifecycle by offering more control over the event processing required of a and the presentation rendering. Just as servlets have <fo:inline font-family="monospace" font-size="0.9em">init</fo:inline> and <fo:inline font-family="monospace" font-size="0.9em">destroy</fo:inline> methods, the portlet lifecycle methods listed below are responsible for the initialization and shutdown of concrete and application portlets. For every request made by a user, the <fo:inline font-family="monospace" font-size="0.9em">service</fo:inline> method is invoked which is responsible for invoking the appropriate <fo:basic-link internal-destination="portlet-action">portlet action method</fo:basic-link> if one exists followed by the appropriate <fo:basic-link internal-destination="portlet-render">portlet render method</fo:basic-link> for all portlets that are currently displayed on the portal page. All lifecycle methods throw a <fo:inline font-family="monospace" font-size="0.9em">PortletException</fo:inline> which acts as a proxy for the standard <fo:inline font-family="monospace" font-size="0.9em">javax.servlet.ServletException</fo:inline>. </fo:block><fo:list-block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" id="N10084" provisional-distance-between-starts="1.5em"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10085"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> Application portlet initialization is the first phase of startup. The portlet is instantiated with the <fo:inline font-family="monospace" font-size="0.9em">PortletConfig</fo:inline> information described in <fo:basic-link internal-destination="portlet-objects">Core Portlet API</fo:basic-link> </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">init</fo:inline>(PortletConfig <fo:inline font-style="italic" xmlns="portlet-objects">config</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1009F"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The concrete portlet is placed into service and parametrized with a <fo:inline font-family="monospace" font-size="0.9em">PortletSettings</fo:inline> object described in <fo:basic-link internal-destination="portlet-objects">Core Portlet API</fo:basic-link> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">initConcrete</fo:inline>(PortletSettings <fo:inline font-style="italic" xmlns="portlet-objects">settings</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N100B7"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">service</fo:inline> method is invoked for every client request. Based on the portlet mode or portlet action, it invokes the appropriate action method if there is one followed by the render method of all displayed portlets. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">service</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>, PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N100D0"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The concrete portlet is taken out of service either dynamically when a portlet web application is unloaded or when the portal is shutdown </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">destroyConcrete</fo:inline>() </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N100E0"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The application portlet is taken out of service either dynamically when a portlet web application is unloaded or when the portal is shutdown </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">destroy</fo:inline>() </fo:block> </fo:block></fo:list-item-body></fo:list-item></fo:list-block><fo:block id="N100F0"><fo:block><fo:block><fo:block keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em"><fo:marker marker-class-name="section.head.marker">Portlet Action Methods</fo:marker><fo:block font-size="20.735999999999997pt">Portlet Action Methods</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The Action methods handle any events that a portlet may have triggered. Any kind of form or hyperlink triggered event will cause the <fo:inline font-family="monospace" font-size="0.9em">actionPerformed</fo:inline> method to be executed. Other events included window events when a portlet is minimized, maximized, or resized and message events when a portlet has received a message from another portlet. The <fo:inline font-family="monospace" font-size="0.9em">ActionEvent</fo:inline>, <fo:inline font-family="monospace" font-size="0.9em">WindowEvent</fo:inline> and <fo:inline font-family="monospace" font-size="0.9em">MessageEvent</fo:inline> objects that get passed into the corresponding action methods contain the <fo:inline font-family="monospace" font-size="0.9em">PortletRequest</fo:inline> and <fo:inline font-family="monospace" font-size="0.9em">PortletResponse</fo:inline> objects. </fo:block><fo:list-block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" id="N10108" provisional-distance-between-starts="1.5em"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10109"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">actionPerformed</fo:inline> method is invoked when the portlet receives an action and must be implemented by the portlet developer. This method is performed before any rendering is done via doView, doEdit, etc. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">actionPerformed</fo:inline>(ActionEvent <fo:inline font-style="italic" xmlns="portlet-objects">event</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1011F"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">messageReceived</fo:inline> method is invoked when the portlet receives a message. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">messageReceived</fo:inline>(MessageEvent <fo:inline font-style="italic" xmlns="portlet-objects">event</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10135"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">windowMaximized</fo:inline> method is invoked for a portlet when the portlet window is maximized. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">windowMaximized</fo:inline>(WindowEvent <fo:inline font-style="italic" xmlns="portlet-objects">event</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1014B"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">windowMinimized</fo:inline> method is invoked for a portlet when the portlet window is minimized. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">windowMinimized</fo:inline>(WindowEvent <fo:inline font-style="italic" xmlns="portlet-objects">event</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N10161"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">windowResized</fo:inline> method is invoked for a portlet when the portlet window is resized. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">windowResized</fo:inline>(WindowEvent <fo:inline font-style="italic" xmlns="portlet-objects">event</fo:inline>) </fo:block> </fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block><fo:block id="N10177"><fo:block><fo:block><fo:block keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em"><fo:marker marker-class-name="section.head.marker">Portlet Render Methods</fo:marker><fo:block font-size="20.735999999999997pt">Portlet Render Methods</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The portlet container will render portlet presentation for all portlets that are currently visible in the page based on the mode they are in as described previously. A portlet developer can override these methods to provide customized layout by either printing to the output stream of the <fo:inline font-family="monospace" font-size="0.9em">PortletResponse</fo:inline> directly or by using a <fo:inline font-family="monospace" font-size="0.9em">PortletContext</fo:inline> to perform an <fo:inline font-family="monospace" font-size="0.9em">include</fo:inline> on a chosen resource e.g. HTML or a JSP. The <fo:inline font-family="monospace" font-size="0.9em">doTitle</fo:inline> is invoked by the layout engine during portlet rendering. If <fo:inline font-family="monospace" font-size="0.9em">doTitle</fo:inline> is not overriden, then the title obtained from the concrete portlet desfinition is used. </fo:block><fo:list-block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" id="N1018C" provisional-distance-between-starts="1.5em"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N1018D"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">doView</fo:inline> method is invoked for a portlet when it is in <fo:inline font-style="italic">VIEW</fo:inline> mode. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">doView</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>,PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline> ) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N101A9"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">doEdit</fo:inline> method is invoked for a portlet when it is in <fo:inline font-style="italic">EDIT</fo:inline> mode. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">doEdit</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>,PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline> ) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N101C5"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">doConfigure</fo:inline> method is invoked for a portlet when it is in <fo:inline font-style="italic">CONFIGURE</fo:inline> mode. This mode is allowed only for portlet administrators and is intended to provide additional portlet configuration. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">doEdit</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>,PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline> ) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N101E1"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">doHelp</fo:inline> method is invoked for a portlet when it is in <fo:inline font-style="italic">HELP</fo:inline> mode. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">doHelp</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>,PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline> ) </fo:block> </fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="N101FD"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block> The <fo:inline font-family="monospace" font-size="0.9em">doTitle</fo:inline> method is invoked for a portlet during its rendering by the layout engine and can be implemented by a portlet developer to provide a customized title. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap" xmlns="http://www.w3.org/TR/xhtml1/transitional"> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">void</fo:inline> <fo:inline font-family="monospace" font-size="0.9em" xmlns="portlet-objects">doTitle</fo:inline>(PortletRequest <fo:inline font-style="italic" xmlns="portlet-objects">req</fo:inline>,PortletResponse <fo:inline font-style="italic" xmlns="portlet-objects">res</fo:inline> ) </fo:block> </fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence master-reference="body" hyphenate="true" id="portlet-descriptor" language="en" format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Descriptor</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block>Portlet Descriptor</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="before" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="center" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="before" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in" leader-pattern="rule" color="black"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table width="100%" table-layout="fixed" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-width="proportional-column-width(1)" column-number="1"/><fo:table-column column-width="proportional-column-width(1)" column-number="2"/><fo:table-column column-width="proportional-column-width(1)" column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell display-align="after" text-align="left" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="center" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell display-align="after" text-align="right" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt" space-before.optimum="10pt" keep-with-next.within-column="always">Chapter 3. Portlet Descriptor</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The Portlet Descriptor known as <fo:inline font-family="monospace" font-size="0.9em">portlet.xml</fo:inline> defines the application portlet definitions and one or more concrete portlet definitions. The following section describes the available elements and attributes that can be used inside a portlet descriptor. </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"> The Portlet Descriptor has the following structure: </fo:block><fo:block id="portlet.def"><fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start" font-family="monospace" font-size="0.9em" background-color="#E0E0E0" linefeed-treatment="preserve" white-space-collapse="false" wrap-option="no-wrap">
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app-collection> <fo:inline id="portlet.app.collection"
xmlns=""><fo:inline font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<portlet-app-def> <fo:inline id="portlet.app.def"
xmlns=""><fo:inline font-family="ZapfDingbats">❷</fo:inline></fo:inline>
<portlet-app ...> <fo:inline id="portlet.app"
xmlns=""><fo:inline font-family="ZapfDingbats">❸</fo:inline></fo:inline>
<concrete-portlet-app ...> <fo:inline id="portlet.concapp"
xmlns=""><fo:inline font-family="ZapfDingbats">❹</fo:inline></fo:inline>
<concrete-portlet-app ...>
</portlet-app-def>
</portlet-app-collection>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N10234"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N10235"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet-app-collection defines a collection of portlets
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10239"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet-app-def defines an application portlet and one or more
concrete portlet instances
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N1023D"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet-app provides an application portlet definition
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10241"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The concrete-portlet-app provides a concrete portlet definition
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block><fo:block
id="N10245"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">The Application Portlet
Definition</fo:marker><fo:block font-size="20.735999999999997pt">The
Application Portlet
Definition</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">An application portlet definition defines
properties that are fixed for all
concrete portlet instances of this portlet. The following sample
illustrates
the elements and attributes associated with an application portlet
definition.
</fo:block><fo:block id="app.def"><fo:block
space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
<portlet-app id="org.myorganization.portlets.myportlet">
<fo:inline id="app.id" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<portlet-name>Hello World</portlet-name> <fo:inline
id="portlet.name" xmlns=""><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:inline>
<servlet-name>hello</servlet-name> <fo:inline
id="servlet.name" xmlns=""><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:inline>
<portlet-config> <fo:inline id="app.portlet.config"
xmlns=""><fo:inline font-family="ZapfDingbats">❹</fo:inline></fo:inline>
<param-name>AppConfigOne</param-name>
<param-value>one</param-value>
</portlet-config>
<portlet-config>
<param-name>AppConfigTwo</param-name>
<param-value>two</param-value>
</portlet-config>
<allows> <fo:inline id="portlet.allows"
xmlns=""><fo:inline font-family="ZapfDingbats">❺</fo:inline></fo:inline>
<maximized/>
<minimized/>
</allows>
<supports> <fo:inline id="portlet.supports"
xmlns=""><fo:inline font-family="ZapfDingbats">❻</fo:inline></fo:inline>
<view/>
<edit/>
<help/>
<configure/>
</supports>
</portlet-app>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N10261"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N10262"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">id</fo:inline> specifies the actual portlet class
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10269"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) An identifying name. Currently this is not used.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N1026D"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Defines configuration information for this portlet that is
accessible via the
<fo:inline font-family="monospace"
font-size="0.9em">PortletConfig</fo:inline> object described in the
<fo:basic-link internal-destination="portlet-objects">Core
Portlet API</fo:basic-link> chapter.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10278"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) Defines the supported window states of this portlet.
Possible
values include <fo:inline
font-style="italic">minimized</fo:inline> and <fo:inline
font-style="italic">maximized</fo:inline>.
If not specified both states are supported.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10282"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❻</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) Defines which portlet modes are supported for
various markups.
If this is not specified, all modes are enabled.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="concrete.portlet"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">The Concrete Portlet
Definition</fo:marker><fo:block font-size="20.735999999999997pt">The Concrete
Portlet
Definition</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">A concrete portlet definition defines properties
that are specific to
each concrete portlet instance. Multiple concrete portlets can
exist for a single
application portlet. The following sample illustrates the elements
and attributes
associated with a concrete portlet definition.
</fo:block><fo:block id="conc.def"><fo:block
space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
<concrete-portlet-app
id="org.myorganization.portlets.myportlet.1"> <fo:inline id="conc.id"
xmlns=""><fo:inline font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<context-param> <fo:inline id="conc.context"
xmlns=""><fo:inline font-family="ZapfDingbats">❷</fo:inline></fo:inline>
<param-name>buzzle</param-name>
<param-value>yea</param-value>
</context-param>
<concrete-portlet> <fo:inline id="conc.portlet"
xmlns=""><fo:inline font-family="ZapfDingbats">❸</fo:inline></fo:inline>
<portlet-name>Hello World 1</portlet-name>
<fo:inline id="conc.name" xmlns=""><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:inline>
<default-locale>en</default-locale> <fo:inline
id="conc.deflocale" xmlns=""><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:inline>
<language locale="en_US"> <fo:inline id="conc.locale"
xmlns=""><fo:inline font-family="ZapfDingbats">❻</fo:inline></fo:inline>
<title>Hello World - Sample Portlet #1</title>
<fo:inline id="conc.title" xmlns=""><fo:inline
font-family="ZapfDingbats">❼</fo:inline></fo:inline>
<title-short>Hello World</title-short>
<fo:inline id="conc.title.short" xmlns=""><fo:inline
font-family="ZapfDingbats">❽</fo:inline></fo:inline>
<description>Here is a simple
portlet</description> <fo:inline id="conc.description"
xmlns=""><fo:inline font-family="ZapfDingbats">❾</fo:inline></fo:inline>
<keywords>portlet hello world</keywords>
<fo:inline id="conc.keywords" xmlns=""><fo:inline
font-family="ZapfDingbats">❿</fo:inline></fo:inline>
</language>
<language locale="en_DE">
<title>Hallo Welt - Sample Portlet #1</title>
<title-short>Hallo Welt</title-short>
<description>Hier ist ein gleicht
portlet</description>
<keywords>portlet hallo welt</keywords>
</language>
<allowed-access visibility="PRIVATE" role="ADMIN"/>
<fo:inline id="conc.visibility" xmlns=""><fo:inline font-size="75%"
font-weight="bold" font-family="serif" baseline-shift="0.1em"
padding-end="0.2em" padding-start="0.2em" padding-bottom="0.1em"
padding-top="0.1em" color="white"
background-color="#404040">11</fo:inline></fo:inline>
<config-param> <fo:inline id="conc.config"
xmlns=""><fo:inline font-size="75%" font-weight="bold" font-family="serif"
baseline-shift="0.1em" padding-end="0.2em" padding-start="0.2em"
padding-bottom="0.1em" padding-top="0.1em" color="white"
background-color="#404040">12</fo:inline></fo:inline>
<param-name>a config parameter</param-name>
<param-value>a config value</param-value>
</config-param>
</concrete-portlet>
</concrete-portlet-app>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N102B6"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N102B7"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">id</fo:inline> specifies the concrete portlet identifier.
This <fo:inline font-style="italic">must</fo:inline>
be equivalent to the application portlet id with the addition
of a <fo:inline font-style="italic">unique</fo:inline> integer
id following the classname. Generally it is good practice to
start with <fo:inline font-family="monospace" font-size="0.9em">1</fo:inline>
and
increase the count for each additional concrete portlet.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102C7"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) Defines the portlet context information encapsulated
by the <fo:inline font-family="monospace"
font-size="0.9em">PortletApplicationSettings</fo:inline> object
described in the <fo:basic-link
internal-destination="portlet-objects">Core Portlet API</fo:basic-link> chapter.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102D2"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The concrete portlet is used to create the <fo:inline
font-family="monospace" font-size="0.9em">PortletSettings</fo:inline> object
described in the <fo:basic-link
internal-destination="portlet-objects">Core Portlet API</fo:basic-link> chapter.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102DD"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) An identifying name for this concrete portlet.
Currently this is not used.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102E1"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) The default locale to use for this concrete portlet.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102E5"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❻</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) Defines additional language support for the defined
locale.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102E9"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❼</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) The title specified is used during the rendering of
the portlet's title bar.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102ED"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❽</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) A more concise title that may be used for rendering
portlets in WML enabled devices. Currently
not used.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102F1"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❾</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) A brief description of capabilities provided by this
portlet. Currently not used.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102F5"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❿</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) A list of keywords that can be used to index this
portlet from a portlet lookup
service (when one becomes available ;-)) Currently not used.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N102F9"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-size="75%" font-weight="bold" font-family="serif" baseline-shift="0.1em"
padding-end="0.2em" padding-start="0.2em" padding-bottom="0.1em"
padding-top="0.1em" color="white"
background-color="#404040">11</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
(Optional) The <fo:inline font-family="monospace"
font-size="0.9em">visibility</fo:inline> attribute defines who can see
information about this portlet.
Allowed values are <fo:inline font-family="monospace"
font-size="0.9em">PRIVATE</fo:inline> and <fo:inline font-family="monospace"
font-size="0.9em">PUBLIC</fo:inline>. The
<fo:inline font-family="monospace"
font-size="0.9em">role</fo:inline> attribute defines which role a user must
have to have access to this portlet.
Valid values are any of the roles defined in the <fo:inline
font-family="monospace" font-size="0.9em">PortletRole</fo:inline> object
defined in more detail in the
<fo:basic-link internal-destination="portlet-objects">Core
Portlet API</fo:basic-link> chapter.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10310"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-size="75%" font-weight="bold" font-family="serif" baseline-shift="0.1em"
padding-end="0.2em" padding-start="0.2em" padding-bottom="0.1em"
padding-top="0.1em" color="white"
background-color="#404040">12</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Addtional concrete portlet settings that are maintained in the
<fo:inline font-family="monospace" font-size="0.9em">PortletSettings</fo:inline>
object described in the <fo:basic-link
internal-destination="portlet-objects">Core Portlet API</fo:basic-link> chapter.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence
master-reference="body" hyphenate="true" id="portlet-objects" language="en"
format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block
font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table
width="100%" table-layout="fixed" border-bottom-width="0.5pt"
border-bottom-style="solid" border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Core Portlet
API</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before"
text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Core Portlet
API</fo:block></fo:block></fo:table-cell><fo:table-cell display-align="before"
text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in"
leader-pattern="rule"
color="black"/></fo:block></fo:static-content><fo:static-content
flow-name="blank-body"><fo:block
text-align="center"/></fo:static-content><fo:static-content
flow-name="xsl-region-after-first"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow
flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block
margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block
hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt"
space-before.optimum="10pt"
keep-with-next.within-column="always">Chapter 4. Core Portlet
API</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
This chapter describes in greater detail the core portlet API and the
additional features
provided by portlet objects. As discussed previously, the portlet
components act as <fo:inline font-style="italic">Decorators</fo:inline>
in design pattern parlance for corresponding servlet components. For
instance, all the methods available from the
<fo:inline font-family="monospace"
font-size="0.9em">javax.servlet.ServletConfig</fo:inline> object are available
in the <fo:inline font-family="monospace"
font-size="0.9em">PortletConfig</fo:inline> object as well as additional
portlet-centric methods. The core portlet objects are explained below. For
usages and more in-depth explanation
please consult the Tutorials and the Javadoc Portlet API
</fo:block><fo:block id="portlet.objects.config"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletConfig</fo:marker><fo:block
font-size="20.735999999999997pt">PortletConfig</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletConfig</fo:inline> object decorates the <fo:inline
font-family="monospace"
font-size="0.9em">javax.servlet.ServletConfig</fo:inline> object with additional
portlet configuration information. The <fo:inline font-family="monospace"
font-size="0.9em">PortletConfig</fo:inline> interface provides the portlet
with its initialization configuration. Only when the portlet is in
<fo:inline font-family="monospace" font-size="0.9em">CONFIGURE</fo:inline>
mode, it has write access to the configuration data.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletConfig</fo:inline> object can be obtained from a
portlet by calling the <fo:inline font-family="monospace"
font-size="0.9em">getPortletConfig()</fo:inline>
method anywhere in the portlet.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em"
keep-with-next.within-column="always">PortletConfig</fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em" id="N10347"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" keep-with-next.within-column="always"
keep-together.within-column="always" id="N1034A"><fo:inline>getPortletContext :
<fo:inline font-family="monospace"
font-size="0.9em">PortletContext</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the <fo:basic-link
internal-destination="portlet-objects"><fo:inline font-family="monospace"
font-size="0.9em">PortletContext</fo:inline></fo:basic-link> object used to
obtain access
to portlet services, include other resources, etc.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10357"><fo:inline>getName : <fo:inline font-family="monospace"
font-size="0.9em">String</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the portlet name
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1035F"><fo:inline>getGroupName : <fo:inline font-family="monospace"
font-size="0.9em">String</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the group name containing this portlet. this is
equivalent to the portlet web application name
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10367"><fo:inline>supports(Portlet.Mode mode) : <fo:inline
font-family="monospace"
font-size="0.9em">boolean</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns <fo:inline font-family="monospace"
font-size="0.9em">true</fo:inline> if this portlet supports the provided mode,
<fo:inline font-family="monospace"
font-size="0.9em">false</fo:inline> otherwise.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10375"><fo:inline>supports(PortletWindow.State state) : <fo:inline
font-family="monospace"
font-size="0.9em">boolean</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns <fo:inline font-family="monospace"
font-size="0.9em">true</fo:inline> if this portlet supports the provided window
state,
<fo:inline font-family="monospace"
font-size="0.9em">false</fo:inline> otherwise.
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N10383"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletContext</fo:marker><fo:block
font-size="20.735999999999997pt">PortletContext</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletContext</fo:inline> interface defines a portlet's view
of the portlet container within which each portlet is
running. The <fo:inline font-family="monospace"
font-size="0.9em">PortletContext</fo:inline> also allows a portlet to access
resources available to it. Using the context, a
portlet can access the portlet log, obtain portlet service instances and
obtain URL references to resources.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em"
keep-with-next.within-column="always">PortletContext</fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em" id="N1038F"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" keep-with-next.within-column="always"
keep-together.within-column="always" id="N10392"><fo:inline>getContainerInfo :
<fo:inline font-family="monospace"
font-size="0.9em">String</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns information about the GridSphere portlet container
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1039A"><fo:inline>getPortletLog : <fo:inline font-family="monospace"
font-size="0.9em">PortletLog</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns a logger for the portlet to use
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103A2"><fo:inline>getMinorVersion : <fo:inline font-family="monospace"
font-size="0.9em">int</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the minor version of GridSphere
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103AA"><fo:inline>getMajorVersion : <fo:inline font-family="monospace"
font-size="0.9em">int</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the major version of GridSphere
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103B2"><fo:inline>getService(Class service) : <fo:inline
font-family="monospace"
font-size="0.9em">PortletService</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Return a portlet service instance. See <fo:basic-link
internal-destination="portlet-services">Portlet Service
Framework</fo:basic-link> for more information.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103BE"><fo:inline>getText(String bundle, String key, Locale locale) :
<fo:inline font-family="monospace"
font-size="0.9em">String</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Return localized text. <fo:block id="N103C6"><fo:list-block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em"
provisional-label-separation="18pt" provisional-distance-between-starts="36pt +
18pt"><fo:list-item><fo:list-item-label
end-indent="label-end()"><fo:block><fo:external-graphic content-width="36pt"
height="auto" width="auto"
src="url(common-images/important.png)"/></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block font-size="14pt" font-weight="bold"
hyphenate="false"
keep-with-next.within-column="always">Important</fo:block><fo:block>Not
implemented
yet.</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block>
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103C9"><fo:inline>include(String path, <fo:inline font-family="monospace"
font-size="0.9em">PortletRequest</fo:inline> request, <fo:inline
font-family="monospace" font-size="0.9em">PortletResponse</fo:inline>
response)</fo:inline></fo:block><fo:block margin-left="0.25in"><fo:block>
Include a resource into the portlet e.g. a JSP page located at
<fo:inline font-family="monospace" font-size="0.9em">path</fo:inline>.
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N103D8"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletRequest</fo:marker><fo:block
font-size="20.735999999999997pt">PortletRequest</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletRequest</fo:inline> decorates the <fo:inline
font-family="monospace"
font-size="0.9em">javax.servlet.http.HttpServletRequest</fo:inline> with
additional functionality for portlets.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em"
keep-with-next.within-column="always">PortletRequest</fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em" id="N103E4"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" keep-with-next.within-column="always"
keep-together.within-column="always" id="N103E7"><fo:inline>getClient :
<fo:inline font-family="monospace"
font-size="0.9em">Client</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns a <fo:inline font-family="monospace"
font-size="0.9em">Client</fo:inline> object representing the browser device
being used by the client. The purpose of the
Client; is to allow portlet developers with mechanisms for
customizing output based on device type.
The <fo:inline font-family="monospace"
font-size="0.9em">Client</fo:inline> could be used to detect a browser that may
be running on a cell phone or wireless PDA.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N103F5"><fo:inline>getData : <fo:basic-link
internal-destination="portlet.data"><fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline></fo:basic-link></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the user-specific persistent data for the active
portlet. The <fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline> defines any user
specific persistent information for the active portlet. In the
example stock quote portlet,
<fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline> could be used to store a user's
financial information, past trades made, etc.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10405"><fo:inline>getGroup : <fo:inline font-family="monospace"
font-size="0.9em">PortletGroup</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the group represented by this portlet. This is
equivalent to the portlet web application
that contains this portlet
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1040D"><fo:inline>setMode(<fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode</fo:inline>
mode)</fo:inline></fo:block><fo:block margin-left="0.25in"><fo:block>
Sets the mode the portlet should display e.g. <fo:inline
font-family="monospace" font-size="0.9em">Portlet.Mode.CONFIGURE</fo:inline>,
<fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode.VIEW</fo:inline>
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1041C"><fo:inline>getMode : <fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the mode the portlet is running in e.g. <fo:inline
font-family="monospace" font-size="0.9em">Portlet.Mode.CONFIGURE</fo:inline>,
<fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode.VIEW</fo:inline>
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1042A"><fo:inline>getPreviousMode : <fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the previous mode the portlet is running in e.g.
<fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode.CONFIGURE</fo:inline>,
<fo:inline font-family="monospace"
font-size="0.9em">Portlet.Mode.VIEW</fo:inline> or <fo:inline
font-family="monospace" font-size="0.9em">Portlet.Mode.VIEW</fo:inline> if none
existed
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1043B"><fo:inline>getPortletSession : <fo:basic-link
internal-destination="portlet.session"><fo:inline font-family="monospace"
font-size="0.9em">PortletSession</fo:inline></fo:basic-link></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the user's portlet session
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10445"><fo:inline>getPortletSettings :<fo:basic-link
internal-destination="portlet.settings"><fo:inline font-family="monospace"
font-size="0.9em">PortletSettings</fo:inline></fo:basic-link></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the portlet settings. The <fo:inline
font-family="monospace" font-size="0.9em">PortletSettings</fo:inline>
encapsulates concrete portlet information and is
configurable by the portlet administrator. The <fo:inline
font-family="monospace" font-size="0.9em">PortletSettings</fo:inline> provides
access to the portlet's
title, <fo:inline font-family="monospace"
font-size="0.9em">PortletApplicationSettings</fo:inline> and configuration
attributes from the concrete portlet definition in the portlet.xml file.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10458"><fo:inline>getRole : <fo:inline font-family="monospace"
font-size="0.9em">PortletRole</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the user's role representation, one of the following:
<fo:inline font-family="monospace"
font-size="0.9em">PortletRole.GUEST</fo:inline>,
<fo:inline font-family="monospace"
font-size="0.9em">PortletRole.USER</fo:inline>, <fo:inline
font-family="monospace" font-size="0.9em">PortletRole.ADMIN</fo:inline>,
<fo:inline font-family="monospace"
font-size="0.9em">PortletRole.SUPER</fo:inline>,
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1046C"><fo:inline>getUser : <fo:inline font-family="monospace"
font-size="0.9em">User</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the user representation. The <fo:inline
font-family="monospace" font-size="0.9em">User</fo:inline> is a bean containing
information about the logged in user
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10477"><fo:inline>getWindow : <fo:inline font-family="monospace"
font-size="0.9em">PortletWindow</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns the portlet window representing the window state of
this portlet
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N1047F"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletResponse</fo:marker><fo:block
font-size="20.735999999999997pt">PortletResponse</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletResponse</fo:inline> decorates the <fo:inline
font-family="monospace"
font-size="0.9em">javax.servlet.http.HttpServletResponse</fo:inline> with
additional methods for the creation of
Uniform Resource Identifiers (URI)'s used in creating hyperlinks.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em" id="N1048B"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" keep-with-next.within-column="always"
keep-together.within-column="always" id="N1048C"><fo:inline>createURI :
<fo:inline font-family="monospace"
font-size="0.9em">PortletURI</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns a portlet URI that can be used to create a hyperlink
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10494"><fo:inline>createURI(<fo:inline font-family="monospace"
font-size="0.9em">PortletWindow.State</fo:inline> state) : <fo:inline
font-family="monospace"
font-size="0.9em">PortletURI</fo:inline></fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Returns a portlet URI that can be used to create a hyperlink to
the chosen window state
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N1049F"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletSession</fo:marker><fo:block
font-size="20.735999999999997pt">PortletSession</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletSession</fo:inline> is merely a wrapper for the
<fo:inline font-family="monospace"
font-size="0.9em">javax.servlet.http.HttpSession</fo:inline> with no additional
functionality.
</fo:block></fo:block><fo:block id="N104AB"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletSettings</fo:marker><fo:block
font-size="20.735999999999997pt">PortletSettings</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletSettings</fo:inline> object provides information about
a portlet that can be accessed and changed
programatically. The <fo:inline font-family="monospace"
font-size="0.9em">PortletSettings</fo:inline> is initially defined by the
concrete portet definition defined in
defined in <fo:basic-link internal-destination="concrete.portlet">The
Concrete Portlet Definition</fo:basic-link> and includes information
such as title, description, locale as well as general configuration
attributes. See the Javadoc API for more
details.
</fo:block></fo:block><fo:block id="N104BB"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">PortletData</fo:marker><fo:block
font-size="20.735999999999997pt">PortletData</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline> defines any user specific persistent
information for the active portlet. The <fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline> object
provides a Hashtable-like interface that allows the storage of <fo:inline
font-family="monospace" font-size="0.9em">String</fo:inline> keys and
<fo:inline font-family="monospace" font-size="0.9em">String</fo:inline> values.
</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence
master-reference="body" hyphenate="true" id="portlet-layout" language="en"
format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block
font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table
width="100%" table-layout="fixed" border-bottom-width="0.5pt"
border-bottom-style="solid" border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet Layout
Framework</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet Layout
Framework</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in"
leader-pattern="rule"
color="black"/></fo:block></fo:static-content><fo:static-content
flow-name="blank-body"><fo:block
text-align="center"/></fo:static-content><fo:static-content
flow-name="xsl-region-after-first"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow
flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block
margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block
hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt"
space-before.optimum="10pt"
keep-with-next.within-column="always">Chapter 5. Portlet Layout
Framework</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The Portal Layout components closely resemble the AWT/Swing components found in
the standard Java classes.
The reason for this is twofold: One, to provide a very close API to create web
based visual components easily
by anyone familiar with Java GUI development under AWT or Swing. The other
reason is to follow the "Composite"
design pattern which allows for maximal flexibility in developing new layouts
composed of various changing
components by composing objects, or portal components, into a tree based
structure. GridSphere creates customized
user layouts composed that are represented as XML layout descriptors.
</fo:block><fo:block id="N104D5"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Portlet Layout
Components</fo:marker><fo:block font-size="20.735999999999997pt">Portlet Layout
Components</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
A portal layout is represented per-user as a <fo:inline font-family="monospace"
font-size="0.9em">PortletPage</fo:inline>. A <fo:inline font-family="monospace"
font-size="0.9em">PortletPage</fo:inline> can contain any number of
portlet components. Generally, portal layout components inherit functionality
from a <fo:inline font-family="monospace"
font-size="0.9em">PortletContainer</fo:inline>
that includes attributes for width, height, a CSS theme and optionally a
required role. Other layout components
listed below may be used in creating a layout descriptor. For more details on
component attributes, see the Javadoc API.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em" keep-with-next.within-column="always">Portlet
Layout Components</fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
space-after.optimum="1em" space-after.minimum="0.8em"
space-after.maximum="1.2em" id="N104E3"><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N104E6"><fo:inline>PortletContent</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Allows external content to be included in the layout using the
<fo:inline font-family="monospace" font-size="0.9em">include</fo:inline>
attribute.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N104EF"><fo:inline>PortletPanel</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
A panel contains a portlet layout which is responsible for
component layout
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N104F5"><fo:inline>PortletGridLayout</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Lays out components in a grid
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N104FB"><fo:inline>PortletTabbedPane</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
A tabbed pane is a container for portlet tabs
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10501"><fo:inline>PortletTab</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
A tab specifies a title and a portlet component that is
displayed when the tab is selected.
This is generally where portlet frames are placed
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10507"><fo:inline>PortletFrame</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
A portlet frame is a visual representation of a portlet. It
includes a title border and the classname of
the portlet to invoke for rendering. Unless the attribute
<fo:inline font-family="monospace" font-size="0.9em">transparent</fo:inline> is
set to true,
a title bar will be rendered. In addition, the <fo:inline
font-family="monospace" font-size="0.9em">required-role</fo:inline> element may
be included
which specifies one of "GUEST", "USER", "ADMIN" or "SUPER" that
restricts access to this portlet based
upon a user's role.
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N10513"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Specifying a
Layout</fo:marker><fo:block font-size="20.735999999999997pt">Specifying a
Layout</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
An external portlet web application specifies the arrangement of portlets in an
XML descriptor file found in
<fo:inline font-family="monospace"
font-size="0.9em">WEB-INF/layout.xml</fo:inline>. The layout descriptor
specifies the organization of portlets within a
double-tabbed pane. An example illustration is shown:
</fo:block><fo:block id="layout.def"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
<portlet-tabbed-pane> <fo:inline id="tab.pane" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<portlet-tab>
<title>Examples</title> <fo:inline id="tab.title"
xmlns=""><fo:inline font-family="ZapfDingbats">❷</fo:inline></fo:inline>
<portlet-tabbed-pane style="sub-menu"> <fo:inline id="tab.pane2"
xmlns=""><fo:inline font-family="ZapfDingbats">❸</fo:inline></fo:inline>
<portlet-tab>
<title>Simple Examples</title>
<portlet-panel>
<grid-layout columns="50,50"> <fo:inline
id="grid.layout" xmlns=""><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:inline>
<portlet-frame> <fo:inline id="frame"
xmlns=""><fo:inline font-family="ZapfDingbats">❺</fo:inline></fo:inline>
<portlet-class>org.myorg.portlets.examples.simpleone.1</portlet-class>
</portlet-frame>
<portlet-frame>
<portlet-class>org.myorg.portlets.examples.simpletwo.1</portlet-class>
</portlet-frame>
</grid-layout>
</portlet-panel>
</portlet-tab>
<portlet-tab>
<title>Demos</title>
<portlet-panel>
<grid-layout>
<portlet-frame>
<name>DemoPortlet</name>
<portlet-class>org.gridlab.gridsphere.portlets.examples.DemoPortlet.1</portlet-class>
</portlet-frame>
</grid-layout>
</portlet-panel>
</portlet-tab>
</portlet-tabbed-pane>
</portlet-tab>
</portlet-tabbed-pane>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N10530"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N10531"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Every layout descriptor must begin with a <fo:inline
font-style="italic">portlet-tabbed-pane</fo:inline> element
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10538"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The tab title is the title string that is presented in the
portal layout
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N1053C"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Although not required, in general a tab contains either a
sub-level tabbed pane or a
<fo:inline font-family="monospace"
font-size="0.9em">portlet-panel</fo:inline>
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10543"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Currently, the only supported panel layout is the grid layout.
The <fo:inline font-family="monospace" font-size="0.9em">columns</fo:inline>
is a comma delimited list of values that represent the column
sizes and must all add up to 100.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N1054A"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet frame is specified as the concrete portlet id
representing the portlet class
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
To learn more about possible attributes and component relationships, look at the
<fo:inline font-family="monospace"
font-size="0.9em">config/mapping/layout-mapping.xml</fo:inline> file in the
GridSphere source. This defines the
relationship between the portlet component classes and the XML descriptions.
</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence
master-reference="body" hyphenate="true" id="portlet-services" language="en"
format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block
font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table
width="100%" table-layout="fixed" border-bottom-width="0.5pt"
border-bottom-style="solid" border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet Service
Framework</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet Service
Framework</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in"
leader-pattern="rule"
color="black"/></fo:block></fo:static-content><fo:static-content
flow-name="blank-body"><fo:block
text-align="center"/></fo:static-content><fo:static-content
flow-name="xsl-region-after-first"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow
flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block
margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block
hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt"
space-before.optimum="10pt"
keep-with-next.within-column="always">Chapter 6. Portlet Service
Framework</fo:block></fo:block></fo:block><fo:block/></fo:block>
Portlet services encapsulate business or logic operations that can be re-used
among portlets.
The use of portlet services helps to minimize the amount of logic placed in a
portlet and present it as
a reusable library to other portlets. In addition, portlet services offer the
following major advantages:
<fo:list-block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em"
provisional-label-separation="0.2em" id="N1055B"
provisional-distance-between-starts="1.5em"><fo:list-item
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="N1055C"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()">Persistence using built-in persistence framework
makes it easy to serialize objects to a relational
database</fo:list-item-body></fo:list-item><fo:list-item
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="N1055E"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()">Method level security using built-in access
control model makes it easy to provide "secure service" proxies that
perform the proper operations based on the user's
role</fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
id="N10560"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()">Integration with testing framework makes it easy
to write JUnit
tests</fo:list-item-body></fo:list-item></fo:list-block><fo:block
id="N10562"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Portlet Service
Architecture</fo:marker><fo:block font-size="20.735999999999997pt">Portlet
Service
Architecture</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
We borrow from the IBM WebSphere service interface to build a services
architecture that we believe
will allow for future integration with a standardized Portlet API. The UML
object diagram of the services
framework is shown below:
</fo:block><fo:block space-before.minimum="0.5em" space-before.optimum="1em"
space-before.maximum="2em" space-after.minimum="0.5em"
space-after.optimum="1em" space-after.maximum="2em" id="N10567"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em"
keep-with-next.within-column="always">Figure 6.1. Portlet Service
Architecture UML</fo:block><fo:block><fo:external-graphic
src="url(portletservices.png)" width="auto" height="auto" content-width="auto"
content-height="auto"/></fo:block></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
A <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceFactory</fo:inline> is responsible for
creating, initializing and destroying portlet services.
A <fo:inline font-family="monospace"
font-size="0.9em">PortletService</fo:inline> defines a blank interface that
is enhanced by the <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceProvider</fo:inline> interface which defines a
lifecycle consisting of
<fo:inline font-family="monospace" font-size="0.9em">init()</fo:inline> and
<fo:inline font-family="monospace" font-size="0.9em">destroy</fo:inline>
methods used when the service is initialized and
shutdown. A <fo:basic-link
internal-destination="portlet-services-descriptor">portlet services
descriptor</fo:basic-link> is used to specify
class information and initialization parameters that is accessed via the
<fo:inline font-family="monospace"
font-size="0.9em">PortletServiceConfig</fo:inline>.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
A portlet service can be obtained from a portlet using the <fo:inline
font-family="monospace" font-size="0.9em">PortletContext</fo:inline> object
<fo:basic-link
internal-destination="portlet.objects.config">PortletContext</fo:basic-link>.
Because the method
<fo:inline font-family="monospace"
font-size="0.9em">getService()</fo:inline> returns a <fo:inline
font-family="monospace" font-size="0.9em">PortletService</fo:inline>, it must
be typecast to the approriate
service instance:
</fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em">
<fo:block space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
ExampleService =
(ExampleService)getPortletConfig().getContext().getService(ExampleService.class);
</fo:block>
</fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em">
Notice that only the service interface is specified and the factory will
use the appropriate service
implementation specified in the services descriptor.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
A <fo:inline font-style="italic">User Service</fo:inline> allows a service
to provide logic appropriate for the user's request. For exaple,
the method <fo:inline font-family="monospace"
font-size="0.9em">deleteUser(User <fo:inline font-family="monospace"
font-size="0.9em">user</fo:inline>)</fo:inline> in the <fo:inline
font-family="monospace" font-size="0.9em">UserManagerService</fo:inline>
requires that a user with the role <fo:inline font-family="monospace"
font-size="0.9em">SUPER</fo:inline> requested the service instance. For any
other service
instance, the method will fail with a <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceAuthorizationException</fo:inline>. User serces
not only help
provide a libarry that will "do the right thing" based on a client's role,
but it makes the services much more
robust and secure for other portlet developers to take advantage of.
The only difference in the implementation
</fo:block></fo:block><fo:block
id="portlet-services-descriptor"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Portlet Services
Descriptor</fo:marker><fo:block font-size="20.735999999999997pt">Portlet
Services
Descriptor</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The portlet services descriptor file located in <fo:inline
font-family="monospace"
font-size="0.9em">WEB-INF/PortletServices.xml</fo:inline> specifies
the services provided by this portlet web application. The following example
shows the actual service definitions for
the login and access control manager services.
</fo:block><fo:block id="services.def"><fo:block
space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
<portlet-services> <fo:inline id="portlet.services.def"
xmlns=""><fo:inline font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<service> <fo:inline id="service.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:inline>
<name>Login Service</name> <fo:inline
id="service.name.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:inline>
<description>Provides Login
Capabilities</description> <fo:inline id="service.desc.def"
xmlns=""><fo:inline font-family="ZapfDingbats">❹</fo:inline></fo:inline>
<interface>org.gridlab.gridsphere.services.core.user.LoginService</interface>
<fo:inline id="service.iface.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:inline>
<implementation>org.gridlab.gridsphere.services.core.user.impl.LoginServiceImpl</implementation>
<fo:inline id="service.impl.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❻</fo:inline></fo:inline>
</service>
<service>
<name>Access Control Manager Service</name>
<user-required>true</user-required> <fo:inline
id="service.user.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❼</fo:inline></fo:inline>
<description>Provides Authorization Capabilities to Portal
Users</description>
<interface>org.gridlab.gridsphere.services.core.security.acl.AccessControlManagerService</interface>
<implementation>org.gridlab.gridsphere.services.core.security.acl.impl.AccessControlManagerServiceImpl</implementation>
<service-config> <fo:inline
id="service.config.def" xmlns=""><fo:inline
font-family="ZapfDingbats">❽</fo:inline></fo:inline>
<param-name>some parameter</param-name>
<param-value>some value</param-value>
</service-config>
</service>
</portlet-services>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N105D7"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N105D8"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">portlet-services</fo:inline> element delimits the start and
end of a services descriptor
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105DF"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">services</fo:inline> element delimits the start and end of a
portlet service
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105E6"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The name of the portlet service. Not used currently, but could be
used by tools, portlets, etc.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105EA"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❹</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The description of the portlet service. Not used currently, but
could be used by tools, portlets, etc.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105EE"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❺</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet service interface describing the services's methods
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105F2"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❻</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The portlet service implementation class that implements the portlet
service interface
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105F6"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❼</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
This must be set to true for user services, where a User object will
be supplied to create the
service instance.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N105FA"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❽</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Although not actually used in this service, any service can be
configure with supplied initialization
settings expressed as string key value pairs in the displayed form
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N105FE"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Core Portlet
Services</fo:marker><fo:block font-size="20.735999999999997pt">Core Portlet
Services</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block>
GridSphere includes several core services that are used by the gridsphere
portlets and may be used
by other external portlets. Only the Login Service by necessity is not a user
service.
The <fo:inline font-family="monospace"
font-size="0.9em">UserManagerService</fo:inline> and <fo:inline
font-family="monospace" font-size="0.9em">AccessControlService</fo:inline>
require
a User object for creation.
For more details on methods provided by the services, consult the Javadoc API
<fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" font-weight="bold" font-size="12pt"
hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em"
space-after.maximum="0.8em" keep-with-next.within-column="always">Core Portlet
Services</fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
space-after.optimum="1em" space-after.minimum="0.8em"
space-after.maximum="1.2em" id="N10609"><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N1060C"><fo:inline>LoginService</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Provides login capabilities.
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10612"><fo:inline>AccessControlManagerService</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Provides Authorization Capabilities to Portal Users
</fo:block></fo:block><fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
keep-with-next.within-column="always" keep-together.within-column="always"
id="N10618"><fo:inline>UserManagerService</fo:inline></fo:block><fo:block
margin-left="0.25in"><fo:block>
Provides User Administration Capabilities
</fo:block></fo:block></fo:block></fo:block><fo:block
id="portlet-service-example"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Portlet Service
Example</fo:marker><fo:block font-size="20.735999999999997pt">Portlet Service
Example</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
In the following example we illustrate the <fo:inline
font-family="monospace" font-size="0.9em">StockQuoteService</fo:inline> with a
single method
<fo:inline font-family="monospace" font-size="0.9em">getStockQuotes() :
List</fo:inline> which returns a list of stock quotes obtained from the
quote.com service.
</fo:block><fo:block id="N1062B"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Create service
definition</fo:marker><fo:block font-size="17.28pt">Create service
definition</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">Create a services definition entry in the
<fo:inline font-family="monospace"
font-size="0.9em">WEB-INF/PortletServices.xml</fo:inline> of
the portlet web application</fo:block><fo:block
id="services.def.xml"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
...
<service>
<name>Stock Quote Service</name>
<description>Provides Stock Quotes</description>
<interface>org.myorg.services.StockQuoteService</interface>
<fo:inline id="ex.iface" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<implementation>org.myorg.services.impl.StockQuoteServiceImpl</implementation>
<service-config>
<param-name>quote_service</param-name>
<param-value>quote.com</param-value>
</service-config>
</service>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N1063C"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N1063D"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The class files should be named accordingly and must be located in
any directory called <fo:inline font-family="monospace"
font-size="0.9em">services</fo:inline>
in the <fo:inline font-family="monospace"
font-size="0.9em">src</fo:inline> directory in order for the template project
build script to handle them properly.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N10649"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Create service
interface</fo:marker><fo:block font-size="17.28pt">Create service
interface</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">Create a services interface as
shown:</fo:block><fo:block id="example.iface"><fo:block
space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
package org.myorg.services.StockQuoteService;
import org.gridlab.gridsphere.portlet.service;
import java.util.List;
public interface StockQuoteService extends PortletService { <fo:inline
id="def.serv" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
public List getStockQuotes(); <fo:inline id="serv.method"
xmlns=""><fo:inline font-family="ZapfDingbats">❷</fo:inline></fo:inline>
}
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N10659"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N1065A"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">StockQuoteService</fo:inline> must subclass from <fo:inline
font-family="monospace" font-size="0.9em">PortletService</fo:inline>
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10664"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
Single method <fo:inline font-family="monospace"
font-size="0.9em">getStockQuotes</fo:inline> defined in the body
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N1066B"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Create service
implementation</fo:marker><fo:block font-size="17.28pt">Create service
implementation</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">Create a
stock quote service implementation as shown:</fo:block><fo:block
id="example.impl"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
package org.myorg.services.impl.StockQuoteServiceImpl;
import org.myorg.services.StockQuoteService;
import org.gridlab.gridsphere.portlet.service.*;
import org.gridlab.gridsphere.portlet.service.spi.PortletServiceProvider;
import java.util.List;
public class StockQuoteServiceImpl implements PortletServiceProvider,
StockQuoteService { <fo:inline id="def.serv.impl" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
public void init(PortletServiceConfig config) <fo:inline
id="serv.init.method" xmlns=""><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:inline>
throws PortletServiceUnavailableException {
// Place optional startup routines e.g. loading data from database
}
public void destroy() { <fo:inline
id="serv.destroy.method" xmlns=""><fo:inline
font-family="ZapfDingbats">❸</fo:inline></fo:inline>
// Place optional shutdown routines here e.g. saving data to
database
}
public List getStockQuotes() {
// hypothetical code to return stock quotes
}
}
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N1067E"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N1067F"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">StockQuoteServiceImpl</fo:inline> must provide
implementations for the
<fo:inline font-family="monospace"
font-size="0.9em">StockQuoteService</fo:inline> and the lifecycle routines from
the <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceProvider</fo:inline>
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N1068C"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">destroy</fo:inline>() method provides a service with the
ability to perform any
initialization tasks before it used. The <fo:inline
font-family="monospace" font-size="0.9em">PortletServiceConfig</fo:inline>
object provides any initialization
data required.
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10696"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">destroy</fo:inline>() method provides a service with the
ability to perform any
cleanup tasks before it is shutdown such as freeing database
connections, etc.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N1069D"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Access service from
portlet</fo:marker><fo:block font-size="17.28pt">Access service from
portlet</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">The following skeleton portlet code
demonstrates how to obtain a stock quote service:</fo:block><fo:block
id="example.portlet"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
package org.myorg.portlets.StockQuotePortlet;
// imports omitted
public class StockQuotePortlet extends AbstractPortlet {
public void actionPerformed(ActionEvent event) {
PortletContext ctx = getPortletConfi().getContext();
StockQuoteService quoteService = null;
try {
StockQuoteService quoteService =
(StockQuoteService)ctx.getService(StockQuoteService.class);
} catch (PortletServiceException e) {
getPortletLog().error("Couldn't get quote service instance", e);
return;
}
// get quotes and place in request
List quotes = quoteService.getStockQuotes();
req.setAttribute("stocks", quotes);
}
public void doView(PortletRequest req, PortletResponse res) {
// display stock quotes
List quotes = req.getAttribute("stocks");
...
}
}
</fo:block></fo:block></fo:block></fo:block><fo:block
id="N106A7"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">User Portlet Service
Example</fo:marker><fo:block font-size="20.735999999999997pt">User Portlet
Service
Example</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
Continuing with the stock quote example, assume we want to allow portal
administrators the ability to
configure the quote service that it gets stock information from. In
this case, the StockQuoteService
will become a user service.
</fo:block><fo:block id="N106AC"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Create user service
definition</fo:marker><fo:block font-size="17.28pt">Create user service
definition</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">The only addition to the service definition
is to set the <fo:inline font-family="monospace"
font-size="0.9em">user-required</fo:inline> element to be <fo:inline
font-family="monospace" font-size="0.9em">true</fo:inline></fo:block><fo:block
id="N106B6"><fo:block space-before.minimum="0.8em" space-before.optimum="1em"
space-before.maximum="1.2em" space-after.minimum="0.8em"
space-after.optimum="1em" space-after.maximum="1.2em"
xmlns="http://www.w3.org/TR/xhtml1/transitional" text-align="start"
font-family="monospace" font-size="0.9em" background-color="#E0E0E0"
linefeed-treatment="preserve" white-space-collapse="false"
wrap-option="no-wrap">
...
<service>
<name>Stock Quote Service</name>
<user-required>true</user-required>
<description>Provides Stock Quotes</description>
<interface>org.myorg.services.StockQuoteService</interface>
<fo:inline id="ex.uiface" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
<implementation>org.myorg.services.impl.StockQuoteServiceImpl</implementation>
<service-config>
<param-name>quote_service</param-name>
<param-value>quote.com</param-value>
</service-config>
</service>
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N106BD"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N106BE"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
<fo:block id="N106C2"><fo:list-block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
space-after.optimum="1em" space-after.minimum="0.8em"
space-after.maximum="1.2em" provisional-label-separation="18pt"
provisional-distance-between-starts="36pt +
18pt"><fo:list-item><fo:list-item-label
end-indent="label-end()"><fo:block><fo:external-graphic content-width="36pt"
height="auto" width="auto"
src="url(common-images/important.png)"/></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block font-size="14pt" font-weight="bold"
hyphenate="false"
keep-with-next.within-column="always">Important</fo:block><fo:block>Must set
<user-required>true</user-required></fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block>
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N106C5"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Edit service
interface</fo:marker><fo:block font-size="17.28pt">Edit service
interface</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
Add the administrator required method below:
</fo:block><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
...
setQuoteService(String quoteService);
....
</fo:block></fo:block><fo:block id="N106CD"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Create user service
implementation</fo:marker><fo:block font-size="17.28pt">Create user service
implementation</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
Now an additional class is created that handles all authorization
decisions and passes control
to the original class. One useful approach is to copy the original
implementation into a
singleton as follows and provide implementations of all service
methods.
</fo:block><fo:block id="N106D2"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
package org.myorg.services.impl.StockQuoteServiceFactory;
import org.myorg.services.StockQuoteService;
import org.gridlab.gridsphere.portlet.service.*;
import org.gridlab.gridsphere.portlet.service.spi.PortletServiceProvider;
import java.util.List;
public class StockQuoteServiceFactory implements PortletServiceProvider,
StockQuoteService {
// create single instance
private instance = new StockQuoteFactory();
private StockQuoteServiceFactory() {} <fo:inline
id="make.singleton" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
public static StockQuoteServiceFactory getInstance() {
return instance;
}
public void init(PortletServiceConfig config)
throws PortletServiceUnavailableException {
// Place optional startup routines e.g. loading data from database
}
public void destroy() {
// Place optional shutdown routines here e.g. saving data to
database
}
public List getStockQuotes() {
// hypothetical code to return stock quotes
}
public void setStockQuoteService(String quoteService) {
// sets the quote service to be used for stock information
}
}
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N106D9"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N106DA"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
To make a singleton, the constructor must be kept <fo:inline
font-style="italic">protected</fo:inline>
or <fo:inline font-style="italic">private</fo:inline> so that
the <fo:inline font-family="monospace"
font-size="0.9em">getInstance</fo:inline>()
is used to return the single reference to this class.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The next step is to add the required security checks into the existing
StockQuoteServiceImpl
and configure it to use the StockQuoteServiceFactory just created.
</fo:block><fo:block id="N106E9"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
package org.myorg.services.impl.StockQuoteServiceImpl;
import org.myorg.services.StockQuoteService;
import org.gridlab.gridsphere.portlet.services.*;
import org.gridlab.gridsphere.portlet.services.spi.PortletServiceProvider;
import java.util.List;
public class StockQuoteServiceImpl implements PortletServiceProvider,
StockQuoteService {
private StockQuoteServiceFactory quoteServiceFactory = null;
private PortletServiceAuthorizer authorizer = null;
public UserManagerServiceImpl(PortletServiceAuthorizer authorizer) {
<fo:inline id="def.userv.impl" xmlns=""><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:inline>
this.authorizer = authorizer;
}
public void init(PortletServiceConfig config)
throws PortletServiceUnavailableException {
// Configure it to use StockQuoteServiceFactory
quoteServiceFactory = StockQuoteServiceFactory.getInstance();
quoteServiceFactory.init();
}
public void destroy() {
// Place optional shutdown routines here e.g. saving data to
database
quoteServiceFactory.destroy();
}
public List getStockQuotes() {
quoteServiceFactory.getStockQuotes();
}
public void setStockQuoteService(String quoteService) { <fo:inline
id="def.setmeth.impl" xmlns=""><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:inline>
// sets the quote service to be used for stock information
// checks to see that the user invoking this method has super
privilege or it will throw
// a runtime AccessDenied Exception
authorizer.authorizeSuperUser();
quoteServiceFactory.setStockQuoteService(quoteService);
}
}
</fo:block><fo:block xmlns="http://www.w3.org/TR/xhtml1/transitional"
id="N106F3"><fo:list-block provisional-label-separation="0.2em"
provisional-distance-between-starts="2.2em" space-before.maximum="1.2em"
space-before.minimum="0.8em" space-before.optimum="1em"><fo:list-item
id="N106F4"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❶</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
<fo:block id="N106F8"><fo:list-block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em"
space-after.optimum="1em" space-after.minimum="0.8em"
space-after.maximum="1.2em" provisional-label-separation="18pt"
provisional-distance-between-starts="36pt +
18pt"><fo:list-item><fo:list-item-label
end-indent="label-end()"><fo:block><fo:external-graphic content-width="36pt"
height="auto" width="auto"
src="url(common-images/important.png)"/></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block font-size="14pt" font-weight="bold"
hyphenate="false"
keep-with-next.within-column="always">Important</fo:block><fo:block>The
constructor of a user service implementation as defined in the
descriptor file must require a <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceAuthorizer</fo:inline> object to be passed in.
This is done by
the <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceFactory</fo:inline> is created allowing for
service methods to make authorization checks using the
<fo:inline font-family="monospace"
font-size="0.9em">PortletServiceAuthorizer</fo:inline></fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block>
</fo:block></fo:list-item-body></fo:list-item><fo:list-item
id="N10703"><fo:list-item-label end-indent="label-end()"><fo:block><fo:inline
font-family="ZapfDingbats">❷</fo:inline></fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:block>
The <fo:inline font-family="monospace"
font-size="0.9em">PortletServiceAuthorizer</fo:inline> provides various
authorization check methods that will throw a runtime
<fo:inline font-family="monospace"
font-size="0.9em">AccessDeniedException</fo:inline> in the event they fail. If
the check succeeds the underlying
<fo:inline font-family="monospace"
font-size="0.9em">StockQuoteServiceFactory</fo:inline> method is invoked.
</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:block></fo:block></fo:block><fo:block
id="N10710"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Access the user service from a
portlet</fo:marker><fo:block font-size="17.28pt">Access the user service from a
portlet</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The only difference from the previous example is passing in the
<fo:inline font-family="monospace" font-size="0.9em">User</fo:inline> object to
the
<fo:inline font-family="monospace"
font-size="0.9em">getService</fo:inline>() method.
</fo:block><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
...
public void actionPerformed(ActionEvent event) {
PortletContext ctx = getPortletConfig().getContext();
PortletRequest req = event.getPortletRequest();
User user = req.getUser();
StockQuoteService quoteService = null;
try {
StockQuoteService quoteService =
(StockQuoteService)ctx.getService(StockQuoteService.class, user);
} catch (PortletServiceException e) {
getPortletLog().error("Couldn't get quote service instance", e);
return;
}
// get quotes and place in request
List quotes = quoteService.getStockQuotes();
req.setAttribute("stocks", quotes);
}
....
</fo:block></fo:block></fo:block><fo:block
id="service.testing"><fo:block><fo:block><fo:block keep-together="always"
font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Portlet Service
Testing</fo:marker><fo:block font-size="20.735999999999997pt">Portlet Service
Testing</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The GridSphere testing framework relies on the <fo:basic-link
external-destination="url(http://www.junit.org)">JUnit</fo:basic-link> and
Jakarta <fo:basic-link
external-destination="url(http://jakarta.apache.org/cactus)">Cactus</fo:basic-link>
testing frameworks to
test portlet services that are deployed to a <fo:basic-link
external-destination="url(http://jakarta.apache.org/tomcat)">Tomcat</fo:basic-link>
container where they are tested.
Check the <fo:inline font-family="monospace"
font-size="0.9em">tests</fo:inline> directory in GridSphere to see how unit
tests are created for services.
Once a new test is created, it must be added to the AllJunitTests.java file.
</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence
master-reference="body" hyphenate="true" id="portlet-persistence" language="en"
format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block
font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table
width="100%" table-layout="fixed" border-bottom-width="0.5pt"
border-bottom-style="solid" border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet
Persistence</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Portlet
Persistence</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in"
leader-pattern="rule"
color="black"/></fo:block></fo:static-content><fo:static-content
flow-name="blank-body"><fo:block
text-align="center"/></fo:static-content><fo:static-content
flow-name="xsl-region-after-first"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow
flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block
margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block
hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt"
space-before.optimum="10pt"
keep-with-next.within-column="always">Chapter 7. Portlet
Persistence</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
GridSphere provides a persistence framework implemented using <fo:basic-link
external-destination="url(http://exolab.castor.org)">Castor</fo:basic-link>
Java Data Objects (JDO)
not to be confused with the actual Java Data Objects specification. Although
Castor is not JDO compliant, it provides
methods to store objects to a SQL based database and supports many database
types. GridSphere by default
is configured to use HSQL, a pure Java in-memory database useful for testing
and development. MySQL and
PostgreSQL are supported under Castor as well. Objects are made persistent by
providing a mapping file that describes
exactly how an object gets mapped to a SQL table.
In addition, <fo:basic-link
external-destination="url(http://castordoclets.sourceforge.net)">Castor
Doclets</fo:basic-link> are used to simplify the task of generating the initial
database configuration scripts and the generation of the mapping files. Ant
tasks are then executed to create the
initial GridSphere database.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
In general when requiring persistence in a portlet, first see if the
<fo:basic-link internal-destination="portlet.data"><fo:inline
font-family="monospace"
font-size="0.9em">PortletData</fo:inline></fo:basic-link> object can meet your
needs. Although, it only provides
a container for simple <fo:inline font-family="monospace"
font-size="0.9em">String</fo:inline> key/value pairs it can go a long way.
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
In the case that a portlet requires more sophisticated storage, the best
approach is to create a separate
portlet service for this management. See <fo:basic-link
internal-destination="portlet-service-example">Portlet Service
Example</fo:basic-link>
</fo:block><fo:block id="N10753"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">Creating Persistent
Objects</fo:marker><fo:block font-size="20.735999999999997pt">Creating
Persistent
Objects</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
I know I have to use castor doclet tags-- but which ones and why?
</fo:block></fo:block><fo:block id="N10758"><fo:block><fo:block><fo:block
keep-together="always" font-family="sans-serif" margin-left="-4pc"><fo:block
keep-with-next.within-column="always"><fo:block font-family="sans-serif"
font-weight="bold" keep-with-next.within-column="always"
space-before.minimum="0.8em" space-before.optimum="1.0em"
space-before.maximum="1.2em"><fo:marker
marker-class-name="section.head.marker">The Persistence
Manager</fo:marker><fo:block font-size="20.735999999999997pt">The Persistence
Manager</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The <fo:inline font-family="monospace"
font-size="0.9em">PersistenceManagerRdbms</fo:inline> interface defines methods
for retrieving, creating, updating
and deleting objects from the database. A <fo:inline
font-family="monospace"
font-size="0.9em">PersistenceManagerException</fo:inline> is thrown in the
case that an error occurs.
The <fo:inline font-family="monospace"
font-size="0.9em">PersistenceManagerFactory</fo:inline> is used to create
database instances for clients to use.
The <fo:inline font-family="monospace"
font-size="0.9em">createGridSphereRdbms</fo:inline> will return the default
GridSphere database which is used
by core GridSphere services and <fo:inline font-family="monospace"
font-size="0.9em">PortletData</fo:inline> objects. To obtain a database
appropriate for your portlet service
The following listing illustrates the retrieval of an object from the
database using the persitence manager.
</fo:block><fo:block id="N1076C"><fo:block space-before.minimum="0.8em"
space-before.optimum="1em" space-before.maximum="1.2em"
space-after.minimum="0.8em" space-after.optimum="1em"
space-after.maximum="1.2em" xmlns="http://www.w3.org/TR/xhtml1/transitional"
text-align="start" font-family="monospace" font-size="0.9em"
background-color="#E0E0E0" linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="no-wrap">
...
PersistenceManagerRdbms pm =
PersistenceManagerFactory.createProjectPersistenceManagerRdbms(<fo:inline
font-style="italic" xmlns="">"webappname"</fo:inline>);
// retrieve
// store persistent data
pm.store(pmdata);
</fo:block></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence
master-reference="body" hyphenate="true" id="portlet-resources" language="en"
format="1"><fo:static-content flow-name="xsl-region-before-first"><fo:block
font-family="serif" margin-left="-4pc" margin-right="-4pc"><fo:table
width="100%" table-layout="fixed" border-bottom-width="0.5pt"
border-bottom-style="solid" border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Additional Portlet
Resources</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block>Additional Portlet
Resources</fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-before-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-bottom-width="0.5pt" border-bottom-style="solid"
border-bottom-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="before" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="center"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="before" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-footnote-separator"><fo:block><fo:leader leader-length="1in"
leader-pattern="rule"
color="black"/></fo:block></fo:static-content><fo:static-content
flow-name="blank-body"><fo:block
text-align="center"/></fo:static-content><fo:static-content
flow-name="xsl-region-after-first"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-odd"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-even"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content
flow-name="xsl-region-after-blank"><fo:block font-family="serif"
margin-left="-4pc" margin-right="-4pc"><fo:table width="100%"
table-layout="fixed" border-top-width="0.5pt" border-top-style="solid"
border-top-color="black"><fo:table-column
column-width="proportional-column-width(1)" column-number="1"/><fo:table-column
column-width="proportional-column-width(1)" column-number="2"/><fo:table-column
column-width="proportional-column-width(1)"
column-number="3"/><fo:table-body><fo:table-row height="14pt"><fo:table-cell
display-align="after" text-align="left"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="center"
relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell
display-align="after" text-align="right"
relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow
flow-name="xsl-region-body"><fo:block font-family="sans-serif"><fo:block
margin-left="-4pc"><fo:block font-weight="bold" font-size="24.8832pt"><fo:block
hyphenate="false" space-before.maximum="12pt" space-before.minimum="8pt"
space-before.optimum="10pt"
keep-with-next.within-column="always">Chapter 8. Additional Portlet
Resources</fo:block></fo:block></fo:block><fo:block/></fo:block><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
The architecture of GridSphere and API definitions of key portlet concepts
matches the portlet API provided
by IBM WebSphere to a large extent. An excellent source of more information
on portlets and portlet development
is the <fo:basic-link
external-destination="url(http://www7b.boulder.ibm.com/wsdd/zones/portal/)">IBM
WebSphere Portal Zone</fo:basic-link>
and the following IBM WebSphere documents:
<fo:list-block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em"
provisional-label-separation="0.2em" id="N1077F"
provisional-distance-between-starts="1.5em"><fo:list-item
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="N10780"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:basic-link
external-destination="url(http://www-106.ibm.com/developerworks/ibm/library/i-portletintro/)">The
Case for
Portlets</fo:basic-link></fo:list-item-body></fo:list-item><fo:list-item
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="N10784"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:basic-link external-destination="url()">IBM
WebSphere 4.X Portlet Developer's
Guide"</fo:basic-link></fo:list-item-body></fo:list-item><fo:list-item
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="N10789"><fo:list-item-label
end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body
start-indent="body-start()"><fo:basic-link
external-destination="url(http://www-106.ibm.com/developerworks/ibm/library/i-portal/)">(part
1)</fo:basic-link><fo:basic-link
external-destination="url(http://www-106.ibm.com/developerworks/ibm/library/i-portal2/)">(part
2)</fo:basic-link></fo:list-item-body></fo:list-item></fo:list-block>
</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
Currently the <fo:basic-link
external-destination="url(http://www.jcp.org/jsr/detail/168.jsp)">Portlet Jave
Specification Request</fo:basic-link> (JSR) has yet to be finalized so several
implementations exist. The
<fo:basic-link
external-destination="url(http://jakarta.apache.org/jetspeed)">Jetspeed</fo:basic-link>
project provides an open-source portlet implementation.
</fo:block></fo:flow></fo:page-sequence></fo:root>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
