BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules.service
Class ServiceProviderManager

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.service.ServiceProviderManager

public class ServiceProviderManager
extends java.lang.Object

Implements a rules service provider manager


Field Summary
static java.lang.String DIRECTORY_RELATIVE_URI_LEADING_STRING
          The leading character(s) of a ruleset-directory-relative uri
static java.lang.String FILE_PROTOCOL
          The protocol string for file uri's
static java.lang.String HOST_DELIMITER
          The delimiter string used after the host in a uri
static java.lang.String PROTOCOL_DELIMITER
          The delimiter string used after the protocol in a uri
static char URI_EXTENSION_DELIMITER
          The character used to delimit a uri extension
static java.lang.String XML_EXTENSION
          The file extension for xml files
 
Constructor Summary
ServiceProviderManager(int rulesetExpirationPolicy, long rulesetExpirationAge, java.lang.String rulesheetDirectory, java.util.Map mimeTypesMap, java.util.Map mimeTypeHandlersMap, java.lang.String vendorIndependentMimeType, javax.naming.Context jndiContext, java.lang.String rulesetDataHomeName)
          Constructor
 
Method Summary
 Context createContext(java.lang.String rulesetURI)
          Creates a context for the given rule set uri
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY_RELATIVE_URI_LEADING_STRING

public static final java.lang.String DIRECTORY_RELATIVE_URI_LEADING_STRING
The leading character(s) of a ruleset-directory-relative uri

FILE_PROTOCOL

public static final java.lang.String FILE_PROTOCOL
The protocol string for file uri's

HOST_DELIMITER

public static final java.lang.String HOST_DELIMITER
The delimiter string used after the host in a uri

PROTOCOL_DELIMITER

public static final java.lang.String PROTOCOL_DELIMITER
The delimiter string used after the protocol in a uri

URI_EXTENSION_DELIMITER

public static final char URI_EXTENSION_DELIMITER
The character used to delimit a uri extension

XML_EXTENSION

public static final java.lang.String XML_EXTENSION
The file extension for xml files
Constructor Detail

ServiceProviderManager

public ServiceProviderManager(int rulesetExpirationPolicy,
                              long rulesetExpirationAge,
                              java.lang.String rulesheetDirectory,
                              java.util.Map mimeTypesMap,
                              java.util.Map mimeTypeHandlersMap,
                              java.lang.String vendorIndependentMimeType,
                              javax.naming.Context jndiContext,
                              java.lang.String rulesetDataHomeName)
                       throws java.lang.IllegalArgumentException,
                              RulesServiceException
Constructor
Parameters:
rulesetExpirationPolicy - The rule set expiration policy
rulesetExpirationAge - The age in milliseconds at which rulesets should be expired. Ignored if rulesetExpirationPolicy is not EXPIRE_RULE_SET_AT_AGE
rulesheetDirectory - The rulesheet deployment directory
mimeTypesMap - The map of uri extensions to mime types
mimeTypeHandlersMap - The map of mime types to mime type handlers
vendorIndependentMimeType - The vendor independent, xml-based mime type
jndiContext - The jndi context to use for lookups
Throws:
java.lang.IllegalArgumentException - Thrown if: 1. rulesetExpirationPolicy is invalid 2. rulesetExpirationPolicy is EXPIRE_RULE_SET_AT_AGE and rulesetExpirationAge is negative 3. mimeTypesMap is null 4. mimeTypeHandlersMap is null 5. vendorIndependentMimeType is null or zero-length 6. jndiContext is null 7. rulesetDataHomeName is null or zero-length
RulesServiceException -  
Method Detail

createContext

public Context createContext(java.lang.String rulesetURI)
                      throws RulesServiceException
Creates a context for the given rule set uri
Parameters:
rulesetURI - The rule set uri for which a context is to be created
Returns:
The new context
Throws:
java.lang.IllegalArgumentException - Thrown if rulesetURI is null
RulesServiceException - Thrown if unable to create the context TODO: 1. Improve no-service-provider-found code

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved