© 2001 BEA Systems, Inc.

com.beasys.commerce.foundation.pipeline
Interface PipelineSessionExtended

All Superinterfaces:
PipelineSession, java.io.Serializable

public interface PipelineSessionExtended
extends PipelineSession

Information about the current customer's session is stored in the PipelineSessionExtended object. For example the following information about the current customer is stored in PipelineSessionExtended.

Important: this interface is an extension of the legacy PipelineSession. New IP and PC implementations should be implementing InputProcessorExtended and PipelineComponentExtended. Correct use of those interface will require functionality (related to associating requestIds with attributes) provided by this interface. Existing IP and PC implementations that operate in an environment in which concurrent requests are possible (such as sites in which HTML frames are used), should be updated to use the new interfaces.

See Also:
PipelineSession, InputProcessorExtended, PipelineComponentExtended, PipelineConstants

Method Summary
 void clearRequestAttributes(int requestId)
          Removes all the attributes for the given request from the PipelineSession.
 boolean containsRequestAttribute(java.lang.String key, int requestId)
          If the given key belongs to the given request then this method returns true.
 java.lang.Object getRequestAttribute(java.lang.String key, int requestId)
          Gets the named attribute from the PipelineSession.
 java.util.Hashtable getRequestAttributeMap(int requestId)
          Gets the list of all attributes for the specific request as a Hashtable.
 java.util.Enumeration getRequestElements(int requestId)
          Gets the list of all elements in the PipelineSession that belong to the specified request.
 java.util.Enumeration getRequestKeys(int requestId)
          Gets the list of all keys in the PipelineSession that belong to the specified request.
 java.lang.Object removeRequestAttribute(java.lang.String key, int requestId)
          If the given key is present for the given request, then this method removes the key and returns the element.
 void setRequestAttribute(java.lang.String key, java.lang.Object attribute, int requestId)
          Adds the named attribute to the PipelineSession.
 void setRequestAttributeMap(java.util.Hashtable attrMap, int requestId)
          Sets the given Hashtable for the specified request.
 
Methods inherited from interface com.beasys.commerce.foundation.pipeline.PipelineSession
clearAttributes, clearAttributes, containsAttribute, containsAttribute, getAttribute, getAttribute, getAttributeMap, getElements, getElements, getKeys, getKeys, removeAttribute, removeAttribute, setAttribute, setAttribute, setAttributeMap
 

Method Detail

setRequestAttribute

public void setRequestAttribute(java.lang.String key,
                                java.lang.Object attribute,
                                int requestId)
Adds the named attribute to the PipelineSession. This method adds the key to the request scope. The attributes added using this API are available until the end of the current HttpServletRequest. The requestId provides scope so that attributes can be correctly associated with a specific request. If the key already exists, then the key is overwritten.
Parameters:
key - a String containing the name of the attribute.
attribute - an Object containing the attribute value.
requestId - the unique identifier of this request

getRequestAttribute

public java.lang.Object getRequestAttribute(java.lang.String key,
                                            int requestId)
Gets the named attribute from the PipelineSession. If the attribute is not available in the given scope then this will return null. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
key - a String containing the name of the attribute.
requestId - the unique identifier of this request
Returns:
an Object containing the attribute value

getRequestAttributeMap

public java.util.Hashtable getRequestAttributeMap(int requestId)
Gets the list of all attributes for the specific request as a Hashtable. The requestId provides scope so that attributes can be correctly associated with a specific request.

Note: this only retrieves the request scoped attributes associated with the requestId, and none of the REQUEST_SCOPE legacy attributes.

Parameters:
requestId - the unique identifier of this request
Returns:
a Hashtable of all the attributes for this request.

setRequestAttributeMap

public void setRequestAttributeMap(java.util.Hashtable attrMap,
                                   int requestId)
Sets the given Hashtable for the specified request. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
attrMap - a Hashtable that is the attribute map.
requestId - the unique identifier of this request

getRequestKeys

public java.util.Enumeration getRequestKeys(int requestId)
Gets the list of all keys in the PipelineSession that belong to the specified request. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
requestId - the unique identifier of this request
Returns:
an Enumeration of all the keys for the request.

getRequestElements

public java.util.Enumeration getRequestElements(int requestId)
Gets the list of all elements in the PipelineSession that belong to the specified request. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
requestId - the unique identifier of this request
Returns:
an Enumeration of all the elements in the specified request.

containsRequestAttribute

public boolean containsRequestAttribute(java.lang.String key,
                                        int requestId)
If the given key belongs to the given request then this method returns true. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
key - a String containing the name of the attribute.
requestId - the unique identifier of this request
Returns:
a boolean, true if key is found in the request's attributes.

removeRequestAttribute

public java.lang.Object removeRequestAttribute(java.lang.String key,
                                               int requestId)
If the given key is present for the given request, then this method removes the key and returns the element. Otherwise returns null. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
key - a String containing the name of the attribute.
requestId - the unique identifier of this request
Returns:
the Object value of the removed element.

clearRequestAttributes

public void clearRequestAttributes(int requestId)
Removes all the attributes for the given request from the PipelineSession. The requestId provides scope so that attributes can be correctly associated with a specific request.
Parameters:
requestId - the unique identifier of this request

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved