com.ibm.commerce.programadapter.security
Class DummyProgramAdapterSessionContext

java.lang.Object
  |
  +--com.ibm.commerce.programadapter.security.DummyProgramAdapterSessionContext
All Implemented Interfaces:
ProgramAdapterSessionContext, SessionContext

public class DummyProgramAdapterSessionContext
extends java.lang.Object
implements ProgramAdapterSessionContext

Dummy Implementation of the com.ibm.commerce.programadapter.security.ProgramAdapterSessionContext interface.


Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
 
Constructor Summary
DummyProgramAdapterSessionContext()
          Creates the dummy implementation of the program adapter session context.
 
Method Summary
 void commit()
          Dummy method to commit the session data.
 boolean didErrorOccur()
          Indicates whether an error occured and the Program Adapter should indicate this.
  CommandProperty getCommandProperty()
          Returns the command property.
 com.ibm.commerce.server.WCSCookie getCookie()
          Will always return null.
 java.lang.Object getExtendedSessionData(java.lang.String strParamName)
          Will always return null because extended session data is not stored.
  SessionData getSessionData()
          Will always return null because the session data is not stored.
 java.lang.String getUniqueSessionTag()
          Gets the unique session tag.
 java.lang.Long getValidUserId()
          Returns a valid user identifier.
 void rollback()
          Rollback previously set session data.
 void setCommandProperty( CommandProperty propertyCommand)
          Sets the CommandProperty
 void setConfiguration( TypedProperty config)
          Sets the configuration for the session context.
 void setExtendedSessionData(java.lang.String strParamName, java.lang.Object strParamVal)
          Sets an extended session data.
 void setRequest(java.lang.Object request)
          Sets the Request Object.
 void setResponse(java.lang.Object response)
          Sets the Response Object
 void setSessionData( SessionData sessionData)
          Sets the base session data.
 void setUniqueSessionTag(java.lang.String strSessionTag)
          Sets the unique session tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values
Constructor Detail

DummyProgramAdapterSessionContext

public DummyProgramAdapterSessionContext()
Creates the dummy implementation of the program adapter session context.
Method Detail

commit

public void commit()
            throws ECSystemException
Dummy method to commit the session data.
Specified by:
commit in interface SessionContext
Throws:
ECSystemException - will never happen.

getCommandProperty

public CommandProperty getCommandProperty()
Returns the command property.
Specified by:
getCommandProperty in interface ProgramAdapterSessionContext
Returns:
The command properties for execution.

getCookie

public com.ibm.commerce.server.WCSCookie getCookie()
Will always return null.
Returns:
Always will return null.

getExtendedSessionData

public java.lang.Object getExtendedSessionData(java.lang.String strParamName)
Will always return null because extended session data is not stored.
Specified by:
getExtendedSessionData in interface SessionContext
Parameters:
strParamName - the parameter name.
Returns:
Will always return null.

getSessionData

public SessionData getSessionData()
Will always return null because the session data is not stored.
Specified by:
getSessionData in interface SessionContext
Returns:
Will always return null.

getUniqueSessionTag

public java.lang.String getUniqueSessionTag()
Gets the unique session tag.
Specified by:
getUniqueSessionTag in interface SessionContext
Returns:
Will always return null.

getValidUserId

public java.lang.Long getValidUserId()
                              throws ECSystemException
Returns a valid user identifier.
Specified by:
getValidUserId in interface SessionContext
Returns:
Will always return the generic user identifier com.ibm.commerce.server.ECConstants.EC_GENERIC_USER_REFNUM.
Throws:
ECSystemException - will never happen.

rollback

public void rollback()
              throws ECSystemException
Rollback previously set session data.
Specified by:
rollback in interface SessionContext
Throws:
ECSystemException - will never happen because the rollback does not do anything since nothing will be stored.

setCommandProperty

public void setCommandProperty(CommandProperty propertyCommand)
Sets the CommandProperty
Specified by:
setCommandProperty in interface ProgramAdapterSessionContext

setConfiguration

public void setConfiguration(TypedProperty config)
Sets the configuration for the session context.
Specified by:
setConfiguration in interface ProgramAdapterSessionContext
Parameters:
config - the session context configuration.

setExtendedSessionData

public void setExtendedSessionData(java.lang.String strParamName,
                                   java.lang.Object strParamVal)
                            throws ECException
Sets an extended session data. The values passed are not stored.
Specified by:
setExtendedSessionData in interface SessionContext
Parameters:
strParamName - the name of the parameter.
Throws:
ECException - will never happen because the method does not do any action.

setRequest

public void setRequest(java.lang.Object request)
Sets the Request Object.
Specified by:
setRequest in interface ProgramAdapterSessionContext
Parameters:
request - the request object.

setResponse

public void setResponse(java.lang.Object response)
Sets the Response Object
Specified by:
setResponse in interface ProgramAdapterSessionContext
Parameters:
response - the response object.

setSessionData

public void setSessionData(SessionData sessionData)
                    throws ECSystemException
Sets the base session data. This implementation does not store session data so the values will not be stored.
Specified by:
setSessionData in interface SessionContext
Parameters:
sessionData - the session data.
Throws:
ECSystemException - will never happen because the method does not do any action.

setUniqueSessionTag

public void setUniqueSessionTag(java.lang.String strSessionTag)
                         throws ECException
Sets the unique session tag. The unique session tag is not stored.
Specified by:
setUniqueSessionTag in interface SessionContext
Parameters:
strSessionTag - the session specific tag
Throws:
ECException - will never happen because the method does not perform any action.

didErrorOccur

public boolean didErrorOccur()
Indicates whether an error occured and the Program Adapter should indicate this. This will be called when the response is processed.
Specified by:
didErrorOccur in interface ProgramAdapterSessionContext
Returns:
Alway will return false.