|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.remote.prc.RemoteSessionFactory
Factory class for obtaining an IRemoteSession
.
IRemoteSession
is the only session object required by the PRC remote APIs.
No separate Collaboration session or Content session is needed to access
the Collaboration or Content Server remote APIs. To access Collaboration or Content
Server APIs, obtain an IRemoteSession
using the methods in this class,
then obtain either an ICollaborationFactory
or IContentFactory
from the IRemoteSession
Individual Collaboration managers or Content
managers can be obtained using the corresponding methods in
ICollaborationFactory
or IContentFactory
.
Portlets automatically receive the WS Portal (ptapi) SOAP endpoint URL
from the portal and can use
IPortletContext.getRemotePortalSession
to create an IRemoteSession
.
IRemoteSession
Constructor Summary | |
RemoteSessionFactory()
|
Method Summary | |
static IRemoteSession |
getExplicitLoginContext(java.net.URL endpoint,
java.lang.String username,
java.lang.String password)
Returns an IRemoteSession with the same security context in the portal as the specified user. |
static IRemoteSession |
getExplicitLoginContext(java.net.URL endpoint,
java.lang.String username,
java.lang.String password,
int sessionDurationInMinutes)
Returns an IRemoteSession with the same security context in the portal as the specified user. |
static IRemoteSession |
getRemotePortalSession(IPortletContext portletCtx)
Returns an IRemoteSession using the PortletContext |
static IRemoteSession |
getRemotePortalSession(IProxyContext proxyCtx)
Returns an IRemoteSession using the ProxyContext |
static IRemoteSession |
getTokenContext(java.net.URL endpoint,
java.lang.String loginToken)
Returns an IRemoteSession using the specified login token. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RemoteSessionFactory()
Method Detail |
public static IRemoteSession getExplicitLoginContext(java.net.URL endpoint, java.lang.String username, java.lang.String password) throws java.net.MalformedURLException, PortalException, java.rmi.RemoteException
IRemoteSession
with the same security context in the portal as the specified user.
The session is valid for 10 minutes.
endpoint
- the SOAP endpoint of the WS portal (ptapi).
For example, a Java WS portal installation might use
http://hostname:port/ptapi/services/QueryInterfaceAPI
while a .NET WS portal might use
http://hostname:port/ptapi/QueryInterfaceAPI.asmx
.
These endpoints will vary according to the deployment.username
- the username whose security context to usepassword
- the user's password
IRemoteSession
object representing the current session with the portal
java.net.MalformedURLException
- if the endpoint URL is not valid
PortalException
- if the operation resulted in an error on the portal
java.rmi.RemoteException
- if there is a communication problem during the execution of the remote method callpublic static IRemoteSession getExplicitLoginContext(java.net.URL endpoint, java.lang.String username, java.lang.String password, int sessionDurationInMinutes) throws java.net.MalformedURLException, PortalException, java.rmi.RemoteException
IRemoteSession
with the same security context in the portal as the specified user.
endpoint
- the SOAP endpointusername
- the username whose security context to usepassword
- the user's passwordsessionDurationInMinutes
- the number of minutes the session is valid; this value must be positive and can be no greater than one day (60 * 24)
IRemoteSession
object representing the current session with the portal
java.net.MalformedURLException
- if the endpoint URL is not valid
java.lang.IllegalArgumentException
- if sessionDurationInMinutes is less than one or greater than 60 * 24
PortalException
- if the operation resulted in an error on the portal
java.rmi.RemoteException
- if there is a communication problem during the execution of the remote method callpublic static IRemoteSession getTokenContext(java.net.URL endpoint, java.lang.String loginToken) throws java.net.MalformedURLException
IRemoteSession
using the specified login token.
A login token can be obtained from a portal request to a portlet using the
endpoint
- the SOAP endpoint of the WS portal (ptapi).
For example, a Java WS portal installation might use
http://hostname:port/ptapi/services/QueryInterfaceAPI
while a .NET WS portal might use
http://hostname:port/ptapi/QueryInterfaceAPI.asmx
.
These endpoints will vary according to the deployment.loginToken
- the login token that can be obtained from a portal request to a portlet using PortletRequest.getLoginToken
.
IRemoteSession
object representing the current session with the portal
java.net.MalformedURLException
- if the endpoint URL is not validpublic static IRemoteSession getRemotePortalSession(IPortletContext portletCtx) throws java.net.MalformedURLException, NotInRequestException
IRemoteSession
using the PortletContext
IRemoteSession
object representing the current session with the portal
java.net.MalformedURLException
- if the endpoint URL is not valid
NotInRequestException
public static IRemoteSession getRemotePortalSession(IProxyContext proxyCtx) throws java.net.MalformedURLException, NotInRequestException
IRemoteSession
using the ProxyContext
IRemoteSession
object representing the current session with the portal
java.net.MalformedURLException
- if the endpoint URL is not valid
NotInRequestException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2010 Oracle® Corporation. All Rights Reserved.