© 2001 BEA Systems, Inc.

com.beasys.commerce.webflow
Class CommerceInputProcessorExtended

java.lang.Object
  |
  +--com.beasys.commerce.webflow.CommerceInputProcessorExtended
All Implemented Interfaces:
InputProcessorExtended, SchemaManagerConstants, UserManagementConstants

public abstract class CommerceInputProcessorExtended
extends java.lang.Object
implements UserManagementConstants, InputProcessorExtended

A CommerceInputProcessor serves as the base class for all the InputProcessors in WLCS. It implements some common utility methods.

Note: this class makes the CommerceInputProcessor abstract class obsolete. New IP implementations should extend this class, and also any IP that will operate in an environment where concurrent requests on the same HTTP Session can occur (such as sites that use HTML frames).

See Also:
CommerceInputProcessor, InputProcessorExtended, PipelineSessionExtended, UserManagementConstants, PipelineSession, PipelineSessionExtended, LocalProfileBean, InvalidSessionStateException

Field Summary
protected  boolean debug
           
 
Fields inherited from interface com.beasys.commerce.axiom.contact.UserManagementConstants
ANONYMOUS_PROFILE, CACHED_PROFILE, DEFAULT_SCOPE, DEFAULT_SUCCESSOR, DEFAULT_SUCCESSOR_HOME, DEFAULT_SUCCESSOR_JNDI, DEFAULT_SUCCESSOR_PK, DEFAULT_USER, DEFAULT_USER_HOME, DEFAULT_USER_JNDI, DEFAULT_USER_PK, GROUP, GROUP_ENTITY_HOME, PROFILE_MGR, PROFILE_SUCCESSOR, PROFILE_USER, REALM_CONFIG, RESERVED_SCOPE, USER, USER_ENTITY_HOME, USER_MGR
 
Fields inherited from interface com.beasys.commerce.foundation.property.SchemaManagerConstants
APPLICATION_INIT_TYPE, CATALOG_TYPE, CONTENT_TYPE, EVENT_TYPE, REQUEST_TYPE, SCHEMA, SCHEMA_GROUPS, SCHEMA_MANAGER, SESSION_TYPE, USER_TYPE
 
Constructor Summary
CommerceInputProcessorExtended()
           
 
Method Summary
 LocalProfileBean getCachedProfileBean(javax.servlet.http.HttpServletRequest req)
          Gets a LocalProfileBean for the current customer.
 java.lang.Object getCustomerProperty(javax.servlet.http.HttpServletRequest req, java.lang.String property)
          Gets the property for the current customer and returns it as an object.
 java.lang.String getCustomerPropertyAsString(javax.servlet.http.HttpServletRequest req, java.lang.String property)
          Gets the property for the current customer and returns it as a string.
 PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest request)
          Returns the PipelineSession from the current HttpSession.
 PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest request, boolean checkValidity)
          Returns the PipelineSession from the current HttpSession.
 PipelineSessionExtended getPipelineSessionExtended(javax.servlet.http.HttpServletRequest request)
          Returns the PipelineSessionExtended object from the current HttpSession.
 PipelineSessionExtended getPipelineSessionExtended(javax.servlet.http.HttpServletRequest request, boolean checkValidity)
          Returns the PipelineSessionExtended object from the current HttpSession.
protected  void log(int level, java.lang.String message)
          A utility method to log messages
protected  void log(int level, java.lang.String message, java.lang.Throwable exception)
          A utility method to log messages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.beasys.commerce.webflow.InputProcessorExtended
process
 

Field Detail

debug

protected boolean debug
Constructor Detail

CommerceInputProcessorExtended

public CommerceInputProcessorExtended()
Method Detail

getPipelineSessionExtended

public PipelineSessionExtended getPipelineSessionExtended(javax.servlet.http.HttpServletRequest request)
Returns the PipelineSessionExtended object from the current HttpSession. If the HttpSession does not contain a PipelineSessionExtended object, it will create a new PipelineSessionExtended object, associate it with the current HttpSession and then return the PipelineSessionExtended object.
Parameters:
req - the HttpServletRequest object
Returns:
the PipelineSessionExtended object associated with the request

getPipelineSessionExtended

public PipelineSessionExtended getPipelineSessionExtended(javax.servlet.http.HttpServletRequest request,
                                                          boolean checkValidity)
                                                   throws InvalidSessionStateException
Returns the PipelineSessionExtended object from the current HttpSession. If the HttpSession is new and the checkValidity is true then this method throws a InvalidSessionStateException. If the HttpSession is not new, then this method returns the PipelineSessionExtended object from the current HttpSession. If the checkValidity is false and HttpSession is new, then this method creates a new PipelineSessionExtended, associates it with the current HttpSession and returns the newly created PipelineSessionExtended object.
Parameters:
req - the HttpServletRequest object
checkValidity - a boolean, if true this method throws exception if it must create a new session object
Returns:
the PipelineSessionExtended object associated with the request

getPipelineSession

public PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest request)
Returns the PipelineSession from the current HttpSession. If the HttpSession does not contain PipelineSession, it will create a new PipelineSession, associate it with the current HttpSession and then return the PipelineSession

Note: Extenders of this class should be using the PipelineSessionExtended object instead of the legacy PipelineSession object, although retrieval of the PipelineSession object is still permitted.

Parameters:
req - the HttpServletRequest object
Returns:
the PipelineSession object associated with the request (downcast from PipelineSessionExtended)
See Also:


getPipelineSession

public PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest request,
                                          boolean checkValidity)
                                   throws InvalidSessionStateException
Returns the PipelineSession from the current HttpSession. If the HttpSession is new and the checkValidity is true then this method throws a InvalidSessionStateException. If the HttpSession is not new, then this method returns the PipelineSession from the current HttpSession. If the checkValidity is false and HttpSession is new, then this method creates a new PipelineSession, associates it with the current HttpSession and returns the newly created PipelineSession.

Note: Extenders of this class should be using the PipelineSessionExtended object instead of the legacy PipelineSession object, although retrieval of the PipelineSession object is still permitted.

Parameters:
request - HttpServletRequest
checkValidity - boolean.
Returns:
the PipelineSession object associated with the request (downcast from PipelineSessionExtended)
Throws:
InvalidSessionStateException - If the HttpSession was invalidated.
See Also:


getCachedProfileBean

public LocalProfileBean getCachedProfileBean(javax.servlet.http.HttpServletRequest req)
Gets a LocalProfileBean for the current customer.
Parameters:
req - HttpServletRequest.
Returns:
LocalProfileBean.

getCustomerPropertyAsString

public java.lang.String getCustomerPropertyAsString(javax.servlet.http.HttpServletRequest req,
                                                    java.lang.String property)
Gets the property for the current customer and returns it as a string.
Parameters:
req - HttpServletRequest.
property - the property to return.
Returns:
String the property.

getCustomerProperty

public java.lang.Object getCustomerProperty(javax.servlet.http.HttpServletRequest req,
                                            java.lang.String property)
Gets the property for the current customer and returns it as an object.
Parameters:
req - HttpServletRequest.
property - the property to return.
Returns:
Object the property.

log

protected void log(int level,
                   java.lang.String message,
                   java.lang.Throwable exception)
A utility method to log messages
Parameters:
aLevel - int. Possible levels are:
           Log.LOG_DEBUG
           Log.LOG_INFO
           Log.LOG_WARNING
           Log.LOG_ERROR
           Log.LOG_FATAL
           Log.LOG_SECURITY 
 
message - String. The message to be logged.
exception - Throwable. The exception that needs to be logged.

log

protected void log(int level,
                   java.lang.String message)
A utility method to log messages
Parameters:
aLevel - int. Possible levels are:
           Log.LOG_DEBUG
           Log.LOG_INFO
           Log.LOG_WARNING
           Log.LOG_ERROR
           Log.LOG_FATAL
           Log.LOG_SECURITY
 
message - String. The message to be logged.

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved