Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.appflow.common
Interface PipelineSession

public interface PipelineSession
extends java.io.Serializable

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

- The `ShoppingCart`
- Transient pieces of data such as error messages, user's most recent input, etc.

PipelineSession allows attributes when added, to be scoped. The allowed scopes are:

- `SESSION_SCOPE`. The attributes added with this scope are available till the end of the current `HttpSession`.
- `REQUEST_SCOPE`. The attributes added with this scope are availabe till the end of the current `HttpServletRequest`.

All the attributes added to `PipelineSession`, should belong to a specific namespace. Note:

- The API does not permit null values or keys. Any null values or keys will cause `InvalidArgumentException`.
- All the attributes that are set using the setAttribute API has to be serailizable. The attribute names begining with "p13n" both in `HttpSession` and `PipelineSession` are reserved for internal purposes.

Method Summary
`void` | `clearRequestScopedAttributes(java.lang.Object namespace, java.lang.Object requestContext)` Removes all the attributes from the `PipelineSession`.
`void` | `clearSessionScopedAttributes(java.lang.Object namespace)` Removes all the attributes from the `PipelineSession`.
`boolean` | `containsRequestScopedAttribute(java.lang.String key, java.lang.Object namespace, java.lang.Object requestContext)` Returns true if the given key is present in the `PipelineSession`.
`boolean` | `containsSessionScopedAttribute(java.lang.String key, java.lang.Object namespace)` Returns true if the given key is present in the `PipelineSession`.
`Context` | `getContext()` Gets current Webflow execution Context.
`java.lang.Object` | `getDefaultNamespace()` Gets the default namespace for this web application.
`java.util.Enumeration` | `getNamespaceNames()` Gets the names of all the namespaces that are currently available.
`java.lang.Object` | `getRequestScopedAttribute(java.lang.String key, java.lang.Object namespace, java.lang.Object requestContext)` Gets the named attribute from the `PipelineSession`.
`java.util.Hashtable` | `getRequestScopedAttributeMap(java.lang.Object namespace, java.lang.Object requestContext)` Gets the list of all attributes in the `REQUEST_SCOPE` and in given namespace as a Hashtable.
`java.util.Enumeration` | `getRequestScopedKeys(java.lang.Object namespace, java.lang.Object requestContext)` Gets the list of all keys in the PipelineSession.
`java.lang.Object` | `getSessionScopedAttribute(java.lang.String key, java.lang.Object namespace)` Gets the named attribute from the `PipelineSession`.
`java.util.Hashtable` | `getSessionScopedAttributeMap(java.lang.Object namespace)` Gets the list of all attributes in the `SESSION_SCOPE` and in given namespace as a Hashtable.
`java.util.Enumeration` | `getSessionScopedKeys(java.lang.Object namespace)` Gets the list of all keys in the PipelineSession.
`java.lang.Object` | `removeRequestScopedAttribute(java.lang.String key, java.lang.Object namespace, java.lang.Object requestContext)` Removes the key and the element from the `PipelineSession`.
`java.lang.Object` | `removeSessionScopedAttribute(java.lang.String key, java.lang.Object namespace)` Removes the key and the element from the `PipelineSession`.
`void` | `setRequestScopedAttribute(java.lang.String key, java.lang.Object attribute, java.lang.Object namespace, java.lang.Object requestContext)` Adds the named attribute to the `PipelineSession` and sets the scope to the `REQUEST_SCOPE` The attributes set with REQUEST_SCOPE are available till the end of the current `HttpServletRequest`.
`void` | `setRequestScopedAttributeMap(java.util.Hashtable attrMap, java.lang.Object namespace, java.lang.Object requestContext)` Sets the given Hashtable to the `REQUEST_SCOPE`.
`void` | `setSessionScopedAttribute(java.lang.String key, java.lang.Object attribute, java.lang.Object namespace)` Adds the named attribute to the `PipelineSession` and sets the scope to the `SESSION_SCOPE` The attributes set with SESSION_SCOPE are available till the end of the current `HttpSession`.
`void` | `setSessionScopedAttributeMap(java.util.Hashtable attrMap, java.lang.Object namespace)` Sets the given Hashtable to the `SESSION_SCOPE`.

Method Detail

### setSessionScopedAttribute

    public void setSessionScopedAttribute(java.lang.String key,
                                          java.lang.Object attribute,
                                          java.lang.Object namespace)
                                   throws InvalidArgumentException

  Adds the named attribute to the `PipelineSession` and sets the scope to the `SESSION_SCOPE` The attributes set with SESSION_SCOPE are available till the end of the current `HttpSession`. If the key already exists in the given namespace and scope, then the key is overwritten. If the namespace does not exist, then a namespace with the given name is created and then the attribute is added to the newly created namespace.

  Parameters:
    `key` - a String containing the name of the attribute.
    `attribute` - an Object containing the attribute.
    `namespace` - a Object containing the namespace name.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### setRequestScopedAttribute

    public void setRequestScopedAttribute(java.lang.String key,
                                          java.lang.Object attribute,
                                          java.lang.Object namespace,
                                          java.lang.Object requestContext)
                                   throws InvalidArgumentException

  Adds the named attribute to the `PipelineSession` and sets the scope to the `REQUEST_SCOPE` The attributes set with REQUEST_SCOPE are available till the end of the current `HttpServletRequest`. If the key already exists in the given namespace and scope, then the key is overwritten. If the namespace does not exist, then a namespace with the given name is created and then the attribute is added to the newly created namespace.

  Parameters:
    `key` - a String containing the name of the attribute.
    `attribute` - an Object containing the attribute.
    `namespace` - a Object containing the namespace name.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getNamespaceNames

    public java.util.Enumeration getNamespaceNames()

  Gets the names of all the namespaces that are currently available. This method returns the names of all the namespaces that are currently available.

  Returns:
    Enumeration of all the namespace names.

### getSessionScopedAttribute

    public java.lang.Object getSessionScopedAttribute(java.lang.String key,
                                                      java.lang.Object namespace)
                                               throws InvalidArgumentException

  Gets the named attribute from the `PipelineSession`. This method looks for the attribute in the `SESSION_SCOPE` and given namespace. If the attribute is not found then this will return `null`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a Object containing the namespace in which to look for this attribute.
  Returns:
    the attribute value as an Object.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getRequestScopedAttribute

    public java.lang.Object getRequestScopedAttribute(java.lang.String key,
                                                      java.lang.Object namespace,
                                                      java.lang.Object requestContext)
                                               throws InvalidArgumentException

  Gets the named attribute from the `PipelineSession`. This method looks for the attribute in the `REQUEST_SCOPE` and given namespace. If the attribute is not found then this will return `null`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a String containing the namespace in which to look for this attribute.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Returns:
    the attribute value as an Object.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getSessionScopedAttributeMap

    public java.util.Hashtable getSessionScopedAttributeMap(java.lang.Object namespace)
                                                     throws InvalidArgumentException

  Gets the list of all attributes in the `SESSION_SCOPE` and in given namespace as a Hashtable.

  Parameters:
    `namespace` - a Object containing the namespace name
  Returns:
    Hashtable of all the attributes in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getRequestScopedAttributeMap

    public java.util.Hashtable getRequestScopedAttributeMap(java.lang.Object namespace,
                                                            java.lang.Object requestContext)
                                                     throws InvalidArgumentException

  Gets the list of all attributes in the `REQUEST_SCOPE` and in given namespace as a Hashtable.

  Parameters:
    `namespace` - a Object containing the namespace name
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Returns:
    Hashtable of all the attributes in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### setSessionScopedAttributeMap

    public void setSessionScopedAttributeMap(java.util.Hashtable attrMap,
                                             java.lang.Object namespace)
                                      throws InvalidArgumentException

  Sets the given Hashtable to the `SESSION_SCOPE`.

  Parameters:
    `Hashtable` - the attribute map.
    `namespace` - a Object containing the namespace name to which these attributes should belong.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### setRequestScopedAttributeMap

    public void setRequestScopedAttributeMap(java.util.Hashtable attrMap,
                                             java.lang.Object namespace,
                                             java.lang.Object requestContext)
                                      throws InvalidArgumentException

  Sets the given Hashtable to the `REQUEST_SCOPE`.

  Parameters:
    `Hashtable` - the attribute map.
    `namespace` - a Object containing the namespace name to which these attributes should belong.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getSessionScopedKeys

    public java.util.Enumeration getSessionScopedKeys(java.lang.Object namespace)
                                               throws InvalidArgumentException

  Gets the list of all keys in the PipelineSession. Returns an enumeration of all the keys that belong to the `SESSION_SCOPE` and in given namespace

  Parameters:
    `namespace` - a Object containing the namespace.
  Returns:
    Enumeration of all the keys in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getRequestScopedKeys

    public java.util.Enumeration getRequestScopedKeys(java.lang.Object namespace,
                                                      java.lang.Object requestContext)
                                               throws InvalidArgumentException

  Gets the list of all keys in the PipelineSession. Returns an enumeration of all the keys that belong to the `REQUEST_SCOPE` and in given namespace

  Parameters:
    `namespace` - a Object containing the namespace.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Returns:
    Enumeration of all the keys in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### getContext

    public Context getContext()

  Gets current Webflow execution Context.

  Returns:
    a Context object which can be queried to know the name of the Webflow namespace that is being executed.

### getDefaultNamespace

    public java.lang.Object getDefaultNamespace()

  Gets the default namespace for this web application.

  Returns:
    a Object object

### containsSessionScopedAttribute

    public boolean containsSessionScopedAttribute(java.lang.String key,
                                                  java.lang.Object namespace)
                                           throws InvalidArgumentException

  Returns true if the given key is present in the `PipelineSession`. If the given key belongs to the `SESSION_SCOPE` and in given namespace then this method returns `true`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a Object containing the namespace in which to look for.
  Returns:
    `true` if the key is found in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### containsRequestScopedAttribute

    public boolean containsRequestScopedAttribute(java.lang.String key,
                                                  java.lang.Object namespace,
                                                  java.lang.Object requestContext)
                                           throws InvalidArgumentException

  Returns true if the given key is present in the `PipelineSession`. If the given key belongs to the `REQUEST_SCOPE` and in given namespace then this method returns `true`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a Object containing the namespace in which to look for.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Returns:
    `true` if the key is found in the given scope.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### removeSessionScopedAttribute

    public java.lang.Object removeSessionScopedAttribute(java.lang.String key,
                                                         java.lang.Object namespace)
                                                  throws InvalidArgumentException

  Removes the key and the element from the `PipelineSession`. If the given key is present in the `SESSION_SCOPE` and given namespace, then this method removes the key and returns the element. Otherwise returns `null`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a Object containing the namespace from which to remove.
  Returns:
    the removed Object.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### removeRequestScopedAttribute

    public java.lang.Object removeRequestScopedAttribute(java.lang.String key,
                                                         java.lang.Object namespace,
                                                         java.lang.Object requestContext)
                                                  throws InvalidArgumentException

  Removes the key and the element from the `PipelineSession`. If the given key is present in the `REQUEST_SCOPE` and given namespace, then this method removes the key and returns the element. Otherwise returns `null`.

  Parameters:
    `key` - a String containing the name of the attribute.
    `namespace` - a Object containing the namespace from which to remove.
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Returns:
    the removed Object.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### clearSessionScopedAttributes

    public void clearSessionScopedAttributes(java.lang.Object namespace)
                                      throws InvalidArgumentException

  Removes all the attributes from the `PipelineSession`. Removes all the attributes that belong to the `SESSION_SCOPE` and in given namespace.

  Parameters:
    `namespace` - a Object containing the namespace from which to remove alll the attributes
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

### clearRequestScopedAttributes

    public void clearRequestScopedAttributes(java.lang.Object namespace,
                                             java.lang.Object requestContext)
                                      throws InvalidArgumentException

  Removes all the attributes from the `PipelineSession`. Removes all the attributes that belong to the `REQUEST_SCOPE` and in given namespace.

  Parameters:
    `namespace` - a Object containing the namespace from which to remove alll the attributes
    `requestContext` - this gives the current requesting threads context-ID with which this attribute has to be stored in this namespace. If there are multiple requests using this context id the processes can avoid name collisions of attributes as well as it will be guaranteed that the attributes added in this thread are available no matter what the order of execution of the threads are. This context id will be provided to all the processors so that they can pass it along to specific processor types.
  Throws:
    InvalidArgumentException - if any of the arguments are invalid.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved