|
||||||||||
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()
.
IPortletContext.getRequest
Method Summary | |
AggregationMode |
getAggregationMode()
Returns the current AggregationMode for the portlet. |
Alignment |
getAlignment()
Returns the alignment of this 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 encrypted portal preference associated with this portlet. |
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. |
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 |
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 associated with this portlet. |
java.lang.String |
getSettingValue(SettingType type,
java.lang.String name)
Gives the value for any portal preference associated with this portlet. |
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 (for example, phone, PDA, or
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 the portlet is currently displayed in a Community page. |
Methods inherited from interface com.plumtree.remote.portlet.IGenericRequest |
getLoginToken, getRemoteAPIEndpoint |
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 setting (Admin, Community, CommunityPortlet,
Portlet, Session, User, or UserInfo)name
- the name of the setting
null
if the setting was not sent
NotGatewayedException
- if the request is not gatewayedpublic java.lang.String getEncryptedSettingValue(SettingType type, java.lang.String name, javax.crypto.Cipher crypto) throws CryptoException
Note: The same cipher should be used for both encryption and decryption.
IPortletRequest portletRequest = .....;//get IPortletRequest.
javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("DES"); //use DES algorithm.
String decryptedValue = portletRequest.getEncryptedSettingValue(SettingType.Admin, "password", cipher);
type
- the type of setting (Admin, Community, CommunityPortlet,
Portlet, Session, User or UserInfo)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 (Admin, Community, CommunityPortlet,
Portlet, Session, User, or UserInfo)
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 (for example, phone, PDA, or
standard Web browser).
UserInterface
object
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).
PortletMode
instance or null if not found in the request
NotGatewayedException
- if the request is not gatewayedpublic boolean hasTimeZone()
NotGatewayedException
- if the request is not gatewayedpublic java.util.TimeZone getTimeZone() throws NotInRequestException
TimeZone
object representing the end user's
time zone.
TimeZone
object
NotGatewayedException
- if the request is not gatewayed
ProtocolNotSupportedException
- if the portal does not support this feature
NotInRequestException
public int getPortletID()
NotGatewayedException
- if the request is not gatewayedpublic java.lang.String getGatewayConfigValue(java.lang.String valueName) throws NotInRequestException
valueName
- the name of the requested header value
NotGatewayedException
- if the request is not gatewayed
NotInRequestException
- if there is nothing in the header with the requested namepublic 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 featurepublic 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 this portletpublic int getCommunityID()
NotGatewayedException
- if the request is not gatewayed
NotInCommunityException
- if the portlet is not currently displayed on 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 portal 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
otherwisepublic 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 portletpublic boolean isInCommunity()
true
if the portlet is displayed in a Community page and false
otherwise
NotGatewayedException
- if the request is not gatewayedpublic java.lang.String getBasicAuthUsername() throws NotInRequestException
NotInRequestException
- if no Basic Auth username is present in the web requestpublic java.lang.String getBasicAuthPassword() throws NotInRequestException
NotInRequestException
- if no Basic Auth password is present in the web requestpublic 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 featurepublic 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 ©2010 Oracle® Corporation. All Rights Reserved.