com.ibm.policy.manager
Class HttpRequestRuleContext

java.lang.Object
  extended by com.ibm.policy.manager.HttpRequestRuleContext
All Implemented Interfaces:
RuleContext

public class HttpRequestRuleContext
extends java.lang.Object
implements RuleContext

Public implementation of RuleContext representing a request. Accepted request types are HttpServletRequest. Only one request is maintained and retrieved per instance NOTE: This API may only be used in the scope of an HTTP request in WebSphere Portal, i.e. within a theme. The API can not be invoked directly by a custom servlet.

Since:
6.0

Constructor Summary
HttpRequestRuleContext(javax.servlet.http.HttpServletRequest request)
          Add a Rule context based on an HttpServletRequest.
 
Method Summary
 java.util.Collection getContext()
          Retrieve the collection of rules engine objects in this RuleContext.
 java.lang.String getId()
          Retrieve a unique identifier for the session if one is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestRuleContext

public HttpRequestRuleContext(javax.servlet.http.HttpServletRequest request)
Add a Rule context based on an HttpServletRequest.

Parameters:
request - HttpServletRequest to be used
Method Detail

getContext

public java.util.Collection getContext()
Description copied from interface: RuleContext
Retrieve the collection of rules engine objects in this RuleContext. The rules engine must be aware of the contents of the returned collection.

An example implementation class named FooRuleContext, contains a single attribute named foo with a value of either:

. The rules engine is configured to return a classification based on the value of the foo attribute.

Specified by:
getContext in interface RuleContext
Returns:
Collection of rule objects to be used in the execution of a rule. Objects of the collection are of type HttpServletRequest.

getId

public java.lang.String getId()
Retrieve a unique identifier for the session if one is available. Return null if not available.

Specified by:
getId in interface RuleContext