|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IPortletResponse represents the HTTP response sent from the portlet
to the portal. All of the parameters that are sent from the portlet
to the portal are set on IPortletResponse.
Generally, a portlet can obtain an IPortletResponse from
IPortletContext.getResponse().
IPortletContext.getResponse| Method Summary | |
void |
removeAllSettingValues(SettingType type)
Removes all settings of a specific type associated with this portlet from the portal. |
void |
removeSettingValue(SettingType type,
java.lang.String name)
Removes a setting from the portal. |
void |
returnToPortal()
Redirects the user to the portal page on which they started. |
void |
setEncryptedSettingValue(SettingType type,
java.lang.String name,
java.lang.String newValue,
javax.crypto.Cipher crypto)
Uses the cryptographer supplied by the client to encrypt and set a new value for a setting. |
void |
setHostedDisplayMode(HostedDisplayMode mode)
Tells the portal how this page should be displayed (with or without a banner). |
void |
setSettingValue(SettingType type,
java.lang.String name,
java.lang.String newValue)
Sets a new value for any portal preference associated with this portlet. |
void |
setTitle(java.lang.String title)
Sets this portlet's title in the portlet title bar on the portal page. |
| Method Detail |
public void setHostedDisplayMode(HostedDisplayMode mode)
mode - the requested display mode
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that
does not support this feature
java.lang.IllegalStateException - if the method is called more than once per pagepublic void setTitle(java.lang.String title)
title - the title to be displayed for the portlet
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that
does not support this feature
java.lang.IllegalStateException - if the method is called more than once per pagepublic void returnToPortal()
NotGatewayedException - if the request is not gatewayed
public void setSettingValue(SettingType type,
java.lang.String name,
java.lang.String newValue)
Set*Setting() methods in the 3.5 GDK.
Note: UserInfo settings cannot be set by a portlet.
type - the type of setting (Admin, Community, CommunityPortlet,
Portlet, Session or User)name - the name of the settingnewValue - the new value to set for this setting
NotGatewayedException - if the request is not gatewayed
java.lang.IllegalArgumentException - if the user tries to set a UserInfo setting
public void setEncryptedSettingValue(SettingType type,
java.lang.String name,
java.lang.String newValue,
javax.crypto.Cipher crypto)
throws CryptoException
IPortletRequest.getEncryptedSettingValue()
with the same cryptographer. Note: UserInfo settings cannot be set by a ortlet.
For example:
Note: The same cipher should be used for both encryption and decryption.
IPortletResponse portletResponse = .....;//get IPortletResponse
javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("DES");
portletResponse.setEncryptedSettingValue(SettingType.Admin, "password", "secretpassword",cipher);
type - the type of setting (Admin, Community, CommunityPortlet,
Portlet, Session, or User)name - the name of the settingnewValue - the new value to set for this settingcrypto - the cryptographer that should be used to encrypt the setting value
NotGatewayedException - if the request is not gatewayed
java.lang.IllegalArgumentException - if the user tries to set a UserInfo setting
CryptoException - if there is an error encrypting the setting value
public void removeSettingValue(SettingType type,
java.lang.String name)
Remove*Setting() method in the 3.5 GDK.
Note: UserInfo settings cannot be removed by a portlet.
type - the type of setting to remove (Admin, Community, CommunityPortlet,
Portlet, Session, or User)name - the name of the setting to remove
NotGatewayedException - if the request is not gatewayed
java.lang.IllegalArgumentException - if the user tries to remove a UserInfo settingpublic void removeAllSettingValues(SettingType type)
type - {the type of settings to remove (Admin, Community, CommunityPortlet,
Portlet, Session, or User)
NotGatewayedException - if the request is not gatewayed
java.lang.IllegalArgumentException - if the user tries to remove UserInfo settings
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2008 Oracle® Corporation. All Rights Reserved.