com.plumtree.remote.portlet
Interface IPortletContext


public interface IPortletContext

IPortletContext is the root interface for retrieving information from the portal. Generally, the portlet obtains an IPortletContext by using the PortletContextFactory.createPortletContext() static factory method.


Method Summary
 ICredentialProvider getCredentialProvider()
          Returns an instance of an ICredentialProvider for the current portlet request.
 ICredentialSetter getCredentialSetter()
          Returns an instance of an ICredentialSetter for the current portlet response.
 IRemoteSession getRemotePortalSession()
          Deprecated. This method will not be supported from IDK6.5. For Remote Session refer to RemoteSessionFactory
 IPortletRequest getRequest()
          Returns an IPortletRequest representing the HTTP request for this Portlet.
 IPortletResponse getResponse()
          Returns an IPortletResponse representing the HTTP response for this portlet.
 IPortletUser getUser()
          Returns an IPortletUser representing the user currently calling this portlet.
 

Method Detail

getRequest

public IPortletRequest getRequest()
Returns an IPortletRequest representing the HTTP request for this Portlet.

Returns:
an IPortletRequest object

getResponse

public IPortletResponse getResponse()
Returns an IPortletResponse representing the HTTP response for this portlet.

Returns:
an IPortletResponse object

getUser

public IPortletUser getUser()
Returns an IPortletUser representing the user currently calling this portlet.

Returns:
an IPortletUser object

getRemotePortalSession

public IRemoteSession getRemotePortalSession()
                                      throws NotInRequestException,
                                             java.net.MalformedURLException
Deprecated. This method will not be supported from IDK6.5. For Remote Session refer to RemoteSessionFactory

Returns an IRemoteSession, which is a way to call the portal’s remote API to query information and perform actions on the portal. The IRemoteSession passed back will be initialized with a login token and endpoint URL sent by the portal. Because it is using a login token, the Remote Session will have the same security context in the portal as the user of the portlet. Note: The login token and endpoint URL are only sent in version 5.0 and above. The administrator must configure the portal to send the login token to a portlet.

Returns:
an IRemoteSession object
Throws:
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a portal version earlier than 5.0
NotInRequestException - if the administrator has chosen not to send the login token to this portlet
java.net.MalformedURLException - if the endpoint URL is not valid

getCredentialProvider

public ICredentialProvider getCredentialProvider()
Returns an instance of an ICredentialProvider for the current portlet request.


getCredentialSetter

public ICredentialSetter getCredentialSetter()
Returns an instance of an ICredentialSetter for the current portlet response.

Throws:
ProtocolNotSupportedException - if the portlet was sent credentials from the Credential Vault. A portlet cannot set Credential Vault values


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.