VERSION This file documents "IPortletRequest" version 0.1 DESCRIPTION Used by perl based web apps to access the cgi and HTTP headers FWDd by the plumtree portal during a remote portlet request. Class and method names and properties a mirror of those in the Java API from Plumtree/BEA EXCEPTION HANLDING All methods except isGatewayed() and isInCommunity() are supposed to throw an exception in Java if the portlet request is not gatewayed so in this Perl case were echoing an error message and calling exit() and hope that the developer calls one of the afforementioned before any of the others. The getPageID and getLoginToken() methods are supposed to throw an exception if the administrator has not exposed the properties through the web-service advanced-settings interface. The getCommunityID method is also supposed to throw if the portlet is not on a community page. We handle these using the same dieNice sub approach mentioned above. AUTHOR Dean Stringer (deeknow at pobox.com) DEPENDENCIES SYNOPSIS my $portletRequest = new IPortletRequest; print "getPageID: " . $portletRequest->getPageID(); print "favourite motorcycle:" . $portletRequest->getSettingValue('User','FaveBike') print "gatewayed!!!" if $self->isGatewayed(); sample output... getPageID: 536 favourite motorcycle: Honda Fireblade gatewayed!!! METHODS new() IPortletRequest represents the HTTP request sent from the portal to the Portlet. All of the parameters that are sent from the portal to the Portlet are accessible from IPortletRequest (some user-specific parameters are accessible from IPortletUser). getAggregationMode() Returns the current AggregationMode for the Portlet. The aggregation mode indicates whether the Portlet is alone (Single) on the page or displayed with other Portlets (Multiple). getBasicAuthUsername() - NOT IMPLEMENTED/FUNCTIONAL getBasicAuthPassword() - NOT IMPLEMENTED/FUNCTIONAL getClassID() Returns the class ID getCommunityID() Returns the ID of the Community in which the Portlet is currently displayed. getEncryptedSettingValue() - NOT IMPLEMENTED/FUNCTIONAL getGatewayConfigValue() Returns the requested value from the CSP-Gateway-Specific-Config header. Parameters: valueName - name of the requested header value Returns: the requested value from the header getHostPageURI() Returns the URI for the portal page in which the Portlet is currently displayed. getImageServerURI() Returns the URI for the portal Image Server. getLoginToken() Returns the user’s login token from the request. The login token can be used to access the portal as the current user. getPageID() Returns the ID of the portal page on which the Portlet is currently displayed. getPortalUUID() Returns the portal UUID. getPortletID() Returns the Portlet ID for the current Portlet. getPortletMode() Returns a PortletMode object to tell the client what mode the Portlet is running in. The Portlet mode indicates whether the Portlet should display standard content or a summary for small-screened mobile devices. The mode also indicates if the Portlet is syndicated (running asynchronously). getProtocolVersion() Returns the current version of the protocol being used by the portal to communicate with this Portlet. getRemoteAPIEndpoint() Returns the remote API endpoint from the portal request. The remote API endpoint can be used to access the portals remote SOAP API. getReturnURI() Returns the URI for the portal page to return to when done. This URI is typically used when a Portlets Preferences page is finished processing; the Portlet should always return the user to the portal page. getSettingCollection() Returns a map of all settings of the referenced setting type. getSettingValue() Gives the value for any portal preference. Parameters: type - the type of the setting (e.g., Admin, User, or Portlet) name - the name of the setting Returns: the value of the setting and null if the setting was not sent getStylesheetURI() Returns the URI for the stylesheet currently being used by the portal user. getTimeZone() Returns a TimeZone object representing the end users time zone. getUserInterface() - NOT IMPLEMENTED/FUNCTIONAL isGatewayed() - NOT SURE HOW THIS SHOULD BE IMPLEMENTED isInCommunity() Checks if Portlet is currently displayed in a Community page. Returns: true if the Portlet is displayed in a Community page and false otherwise