|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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).
Generally, a Portlet can obtain an IPortletRequest from
IPortletContext.getRequest().
| Method Summary | |
AggregationMode |
getAggregationMode()
Returns the current AggregationMode for the Portlet. |
Alignment |
getAlignment()
Returns the alignment of the portlet. |
java.lang.String |
getBasicAuthPassword()
Returns the password from the HTTP Authorization header in the web request. |
java.lang.String |
getBasicAuthUsername()
Returns the username from the HTTP Authorization header in the web request. |
int |
getClassID()
Returns the class ID. |
int |
getCommunityID()
Returns the ID of the Community in which the Portlet is currently displayed. |
java.lang.String |
getEncryptedSettingValue(SettingType type,
java.lang.String name,
javax.crypto.Cipher crypto)
Gives the value for any portal preference. |
java.lang.String |
getGatewayConfigValue(java.lang.String valueName)
Returns the requested value from the CSP-Gateway-Specific-Config header. |
java.net.URL |
getHostPageURI()
Returns the URI for the portal page in which the Portlet is currently displayed. |
java.lang.String |
getHostPageURLQueryString()
Gets the query string portion of the URL that was used to access this portal's hosting page. |
java.net.URL |
getImageServerURI()
Returns the URI for the portal Image Server. |
java.lang.String |
getLoginToken()
Returns the user’s login token from the request. |
int |
getPageID()
Returns the ID of the portal page on which the Portlet is currently displayed. |
java.lang.String |
getPortalUUID()
Returns the portal UUID. |
int |
getPortletID()
Returns the Portlet ID for the current Portlet. |
PortletMode |
getPortletMode()
Returns a PortletMode object to tell the client what
mode the Portlet is running in. |
java.lang.String |
getProtocolVersion()
Returns the current version of the protocol being used by the portal to communicate with this Portlet. |
java.net.URL |
getRemoteAPIEndpoint()
Returns the remote API endpoint from the portal request. |
java.net.URL |
getReturnURI()
Returns the URI for the portal page to return to when done. |
java.util.Map |
getSettingCollection(SettingType type)
Returns a map of all settings of the referenced setting type. |
java.lang.String |
getSettingValue(SettingType type,
java.lang.String name)
Gives the value for any portal preference. |
java.net.URL |
getStylesheetURI()
Returns the URI for the stylesheet currently being used by the portal user. |
int |
getSubPortalID()
Returns the ID of the subportal that the accessing user belongs to. |
java.util.TimeZone |
getTimeZone()
Returns a TimeZone object representing the end user's
time zone. |
UserInterface |
getUserInterface()
Returns a UserInterface object to tell the client what type of
device is being used to browse the portal (e.g., phone, PDA,
standard Web browser). |
boolean |
hasBasicAuth()
Returns whether the request has basic auth. |
boolean |
hasTimeZone()
Returns a boolean indicating whether the time zone is available in the request headers. |
boolean |
isGatewayed()
Checks if the request is gatewayed. |
boolean |
isInCommunity()
Checks if Portlet is currently displayed in a Community page. |
| Method Detail |
public java.lang.String getSettingValue(SettingType type,
java.lang.String name)
Get*Setting() methods in the 3.5 GDK.
type - the type of the setting (e.g., Admin, User, or Portlet)name - the name of the setting
null if the setting was not sent
NotGatewayedException - if the request is not gatewayed
public java.lang.String getEncryptedSettingValue(SettingType type,
java.lang.String name,
javax.crypto.Cipher crypto)
throws CryptoException
type - the type of setting (e.g., Admin, User, or Portlet)name - the name of the settingcrypto - the cryptographer that can decode the setting value
NotGatewayedException - if the request is not gatewayed
CryptoException - if there is an error decrypting the setting valuepublic java.util.Map getSettingCollection(SettingType type)
type - the type of setting (e.g., Admin, User, or Portlet)
NotGatewayedException - if the request is not gatewayedpublic UserInterface getUserInterface()
UserInterface object to tell the client what type of
device is being used to browse the portal (e.g., phone, PDA,
standard Web browser).
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if the portal does not support the device typepublic PortletMode getPortletMode()
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).
NotGatewayedException - if the request is not gatewayedpublic boolean hasTimeZone()
NotGatewayedException - if the request is not gatewayed.
public java.util.TimeZone getTimeZone()
throws NotInRequestException
TimeZone object representing the end user's
time zone.
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if the portal does not support this feature
NotInRequestException
public java.lang.String getLoginToken()
throws NotInRequestException
IRemoteSession object,
use IPortletContext.getRemotePortalSession().
Note: The login token is new functionality in version 5.0; this method throws
ProtocolNotSupportedException when used with any prior version of the portal.
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal earlier than 5.0
NotInRequestException - if the administrator has not configured the portal to send the
login token to this Portletpublic java.net.URL getRemoteAPIEndpoint()
IRemoteSession object,
use IPortletContext.getRemotePortalSession().
Note: The remote API endpoint is new functionality in version 5.0; this method throws
ProtocolNotSupportedException when used with any prior version of the portal.
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal earlier than 5.0public int getPortletID()
NotGatewayedException - if the request is not gatewayed
public java.lang.String getGatewayConfigValue(java.lang.String valueName)
throws NotInRequestException
valueName - name of the requested header value.
NotGatewayedException - if the request is not gatewayed.
NotInRequestException - if there is nothing in the header with the requested name.public java.lang.String getPortalUUID()
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that
does not support this featurepublic int getClassID()
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that
does not support this feature
public int getPageID()
throws NotInRequestException
ProtocolNotSupportedException when used with any prior version of the portal.
The administrator must configure the portal to send the Page ID to the Portlet.
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with version of the portal earlier than 5.0
NotInRequestException - if the administrator has not configured the portal to send the
Page ID to the Portletpublic int getCommunityID()
NotGatewayedException - if the request is not gatewayed
NotInCommunityException - if the Portlet is not displayed in a Community pagepublic java.net.URL getReturnURI()
IPortletResponse.returnToPortal
to return the user to the portal page.
NotGatewayedException - if the request is not gatewayedpublic java.net.URL getHostPageURI()
NotGatewayedException - if the request is not gatewayedpublic java.net.URL getStylesheetURI()
NotGatewayedException - if the request is not gatewayedpublic java.net.URL getImageServerURI()
NotGatewayedException - if the request is not gatewayedpublic AggregationMode getAggregationMode()
AggregationMode for the Portlet. The aggregation mode
indicates whether the Portlet is alone on the page or displayed with other Portlets.
AggregationMode
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that
does not support this featurepublic java.lang.String getProtocolVersion()
NotGatewayedException - if the request is not gatewayedpublic boolean isGatewayed()
true if the request is gatewayed and false otherwise
public int getSubPortalID()
throws NotInRequestException
NotGatewayedException - if the request is not gatewayed.
ProtocolNotSupportedException - if used with a version of the portal that does not support this feature.
NotInRequestException - if the administrator has not configured the portal to send the subportal ID to this portlet.public boolean isInCommunity()
true if the Portlet is displayed in a Community page and false otherwise
NotGatewayedException - if the request is not gatewayed
public java.lang.String getBasicAuthUsername()
throws NotInRequestException
NotInRequestException - if no Basic Auth username is present in the web request.
public java.lang.String getBasicAuthPassword()
throws NotInRequestException
NotInRequestException - if no Basic Auth password is present in the web request.public boolean hasBasicAuth()
public Alignment getAlignment()
NotGatewayedException - if the request is not gatewayed.
ProtocolNotSupportedException - if used with a version of the portal that does not support this feature.public java.lang.String getHostPageURLQueryString()
NotGatewayedException - if the request is not gatewayed.
ProtocolNotSupportedException - if used with a version of the portal that does
not support this feature.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.