com.ibm.pim.context
Class PIMContextFactory

java.lang.Object
  extended by com.ibm.pim.context.PIMContextFactory
Direct Known Subclasses:
PIMWebServicesContextFactory

public class PIMContextFactory
extends java.lang.Object

Factory for retrieving a context for a given set of credentials

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
static java.lang.String DEFAULT_CONTEXT_CLASS
          Current designated implementation DEFAULT_CONTEXT_CLASS
 
Constructor Summary
PIMContextFactory()
           
 
Method Summary
static Context getContext(java.lang.String userName, java.lang.String userPassword, java.lang.String userCompany)
          Instantiate a new API Context Object based upon username, password and company code.
static Context getCurrentContext()
          Return the current context
static Context getCurrentContextInternal()
          Get current context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values

DEFAULT_CONTEXT_CLASS

public static final java.lang.String DEFAULT_CONTEXT_CLASS
Current designated implementation DEFAULT_CONTEXT_CLASS

See Also:
Constant Field Values
Constructor Detail

PIMContextFactory

public PIMContextFactory()
Method Detail

getCurrentContext

public static Context getCurrentContext()
Return the current context

Returns:
the current context
Throws:
PIMInternalException - if the context is not initialized

getCurrentContextInternal

public static Context getCurrentContextInternal()
Get current context. Used within JSP's for example to get the appropriate Context

Returns:
Context An appropriate Context

getContext

public static Context getContext(java.lang.String userName,
                                 java.lang.String userPassword,
                                 java.lang.String userCompany)
                          throws java.lang.Exception
Instantiate a new API Context Object based upon username, password and company code. Sets the current context.

Parameters:
userName - The userid
userPassword - The user password
userCompany - The company id registered
Returns:
API Context Object for the specified credentials
Throws:
java.lang.Exception - if an error occurs