Skip navigation links
ilog.rules.res.session.rawdata
Class RawDataRuleServiceFactory
java.lang.Object
ilog.rules.res.session.rawdata.RawDataRuleServiceFactory
public class RawDataRuleServiceFactory
- extends Object
RawDataRuleServiceFactory
represent a factory class to create
RawDataRuleService
.
Code example:
The following code show how to execute rules using COBOL raw data.
public IlrSessionResponse executeRulesOnCobolRawData(byte[] user, byte[] cart) throws RawDataRuleExecutionException, IlrSessionException {
RawDataRuleServiceFactory factory = new RawDataRuleServiceFactory();
RawDataRuleService service = factory.createService(RawDataRuleServiceFactory.COBOL_DATA);
IlrPath path = IlrPath.parsePath(rulesetPath);
List<RawDataRulesetParameter> params = new ArrayList<RawDataRulesetParameter>();
RawDataRulesetParameter customer = new RawDataRulesetParameter("customer", user);
params.add(customer);
RawDataRulesetParameter shoppingCart = new RawDataRulesetParameter("shoppingCart", cart);
params.add(shoppingCart);
return service.execute(path, params);
}
Field Summary |
static int |
COBOL_DATA
For COBOL data support |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COBOL_DATA
public static final int COBOL_DATA
- For COBOL data support
- See Also:
- Constant Field Values
RawDataRuleServiceFactory
public RawDataRuleServiceFactory()
createService
public RawDataRuleService createService(int type)
throws IlrSessionCreationException
- Return a raw data rule service using J2SE session factory.
- Throws:
IlrSessionCreationException
- if an error occurred when trying to create a rule session using the default J2SE
session factory.- Parameters:
type
- the service type, should be one of:
- Returns:
- A new raw data rule service using J2SE session factory.
createService
public RawDataRuleService createService(int type,
IlrSessionFactory factory)
- Return a raw data rule service using provided session factory.
- Parameters:
type
- the service type, should be one of:
factory
- rule session factory
- Returns:
- A new raw data rule service using provided session factory.
Skip navigation links
© Copyright IBM Corp. 1987, 2012