com.ibm.workflow.portlet.client
Class PortalContextImpl

java.lang.Object
  |
  +--com.ibm.workflow.portlet.client.PortalContextImpl
All Implemented Interfaces:
PortalContext

public class PortalContextImpl
extends java.lang.Object
implements PortalContext

Provides the implementation for PortalContext. This is a singleton class which features a getInstance method. You should not directly instanciate any object of this class.


Method Summary
 com.ibm.wps.portletservice.credentialvault.credentials.UserPasswordPassiveCredential getCredential(org.apache.jetspeed.portlet.PortletContext context, org.apache.jetspeed.portlet.PortletRequest request, java.lang.String slotName)
          Retrieve a UserPasswordPassiveCredential from this application's slot of the credential vault.
 GlobalRegistrationMap getGlobalRegistrationMap()
          Returns the GlobalRegistrationMap necessary during the logon and logout phase of the user portlet instances in order to share common RegistrationMap objects.
static PortalContextImpl getInstance()
          The getInstance method of the singleton class.
 void saveCredential(org.apache.jetspeed.portlet.PortletContext context, org.apache.jetspeed.portlet.PortletRequest request, java.lang.String user, java.lang.String password, java.lang.String slotName)
          Save a credential in this application's slot of the credential vault.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PortalContextImpl getInstance()
The getInstance method of the singleton class. Do not instanciate any object directly but use this class for getting the unique singleton object.

getGlobalRegistrationMap

public GlobalRegistrationMap getGlobalRegistrationMap()
Description copied from interface: PortalContext
Returns the GlobalRegistrationMap necessary during the logon and logout phase of the user portlet instances in order to share common RegistrationMap objects.
Specified by:
getGlobalRegistrationMap in interface PortalContext
Following copied from interface: com.ibm.workflow.portlet.client.PortalContext
Returns:
the unique global GlobalRegistrationMap

getCredential

public com.ibm.wps.portletservice.credentialvault.credentials.UserPasswordPassiveCredential getCredential(org.apache.jetspeed.portlet.PortletContext context,
                                                                                                          org.apache.jetspeed.portlet.PortletRequest request,
                                                                                                          java.lang.String slotName)
                                                                                                   throws CredentialVaultException,
                                                                                                          org.apache.jetspeed.portlet.service.PortletServiceException,
                                                                                                          com.ibm.wps.portletservice.credentialvault.CredentialSecretNotSetException
Description copied from interface: PortalContext
Retrieve a UserPasswordPassiveCredential from this application's slot of the credential vault. It is assumed that the slot is administrative slot which means that there is one credential per user in a slot which is accessible under a unique slot id. As all exception are derived from PortletException you can catch all exception at once by catching PortletException.
Specified by:
getCredential in interface PortalContext
Following copied from interface: com.ibm.workflow.portlet.client.PortalContext
Parameters:
context - The PortletContext object necessary in order to log and access the credential service.
request - The PortletRequest object necessary in order to correlate the retrieval request to the right user.
slotName - The name of slot which should be used
Returns:
The UserPasswordPassiveCredential

saveCredential

public void saveCredential(org.apache.jetspeed.portlet.PortletContext context,
                           org.apache.jetspeed.portlet.PortletRequest request,
                           java.lang.String user,
                           java.lang.String password,
                           java.lang.String slotName)
                    throws CredentialVaultException,
                           org.apache.jetspeed.portlet.service.PortletServiceException
Description copied from interface: PortalContext
Save a credential in this application's slot of the credential vault. It is assumed that the slot is administrative slot which means that there is one credential per user in a slot which is accessible under a unique slot id.
Specified by:
saveCredential in interface PortalContext
Following copied from interface: com.ibm.workflow.portlet.client.PortalContext
Parameters:
context - The PortletContext object necessary in order to log and access the credential service.
request - The PortletRequest object necessary in order to correlate the save request to the right user.
user - The workflow user name.
password - The workflow password of the user.
slotName - The name of the slot which should be used.


© Copyright IBM Corporation 2002, 2008. All Rights Reserved.