com.cgiams.esl.fp
Class FlowProcessorFactory

java.lang.Object
  extended bycom.cgiams.esl.fp.FlowProcessorFactory

public class FlowProcessorFactory
extends java.lang.Object

This class is a factory class whose sole purpose is to create intances of type FlowProcessor. Here is an example of its use:

 FlowProcessorFactory lo_flow_processor_factory = FlowProcessorFactory.getInstance();
 FlowProcessor lo_flow_processor = lo_flow_processor_factory.getFlowProcessor("c:/config.ini");
 ...
 
The configuration file is defined in detail in the comments for the getFlowProcessor(String) method.

Modification History
Programmer Date Description
Jim Matysczak 03/18/2005 Original Author
Scott Bowers 04/06/2005 Added some additional thread-safety assurances by using static initializers and double-check-locking. Also introduced a DataManagerFactory object that allows more than one type of Data Access object. The default data access remains the iBATIS interface through the new DefaultDataManagerImpl class.


Field Summary
static java.lang.String CACHE_FLOW_PROCESSOR_FLAG
          Constant system option from the configuaration file representing the flow processor's caching indicator
static java.lang.String FLOW_PROCESSOR_DAD_CLASS
          Constant system option from the configuaration file representing the flow processor's internal data access manager class.
static java.lang.String FLOW_PROCESSOR_DAD_FILE
          Constant system option from the configuaration file representing the flow processor's internal data access definitions.
static java.lang.String FLOW_SUBMITTAL_DAD_CLASS
          Constant system option from the configuaration file representing the flow processor's submittal data access manager class.
static java.lang.String FLOW_SUBMITTAL_DAD_FILE
          Constant system option from the configuaration file representing the flow processor's submittal data access definitions.
static java.lang.String ss_cache_flag_cache
          The cache flag value that indicates that FlowProcessor instances should be cached.
static java.lang.String ss_cache_flag_nocache
          The cache flag value that indicates that FlowProcessor instances should NOT be cached.
 
Method Summary
 FlowProcessor getFlowProcessor(java.lang.String as_config_file)
          Returns an instance of type FlowProcessor configured based on the properties in the specified configuration file.
static FlowProcessorFactory getInstance()
          Returns a shared instance of this class that is thread safe.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLOW_PROCESSOR_DAD_FILE

public static final java.lang.String FLOW_PROCESSOR_DAD_FILE
Constant system option from the configuaration file representing the flow processor's internal data access definitions.

See Also:
Constant Field Values

FLOW_PROCESSOR_DAD_CLASS

public static final java.lang.String FLOW_PROCESSOR_DAD_CLASS
Constant system option from the configuaration file representing the flow processor's internal data access manager class.

See Also:
Constant Field Values

FLOW_SUBMITTAL_DAD_FILE

public static final java.lang.String FLOW_SUBMITTAL_DAD_FILE
Constant system option from the configuaration file representing the flow processor's submittal data access definitions.

See Also:
Constant Field Values

FLOW_SUBMITTAL_DAD_CLASS

public static final java.lang.String FLOW_SUBMITTAL_DAD_CLASS
Constant system option from the configuaration file representing the flow processor's submittal data access manager class.

See Also:
Constant Field Values

CACHE_FLOW_PROCESSOR_FLAG

public static final java.lang.String CACHE_FLOW_PROCESSOR_FLAG
Constant system option from the configuaration file representing the flow processor's caching indicator

See Also:
Constant Field Values

ss_cache_flag_cache

public static final java.lang.String ss_cache_flag_cache
The cache flag value that indicates that FlowProcessor instances should be cached. Its value is Y.

See Also:
Constant Field Values

ss_cache_flag_nocache

public static final java.lang.String ss_cache_flag_nocache
The cache flag value that indicates that FlowProcessor instances should NOT be cached. Its value is N.

See Also:
Constant Field Values
Method Detail

getInstance

public static FlowProcessorFactory getInstance()
Returns a shared instance of this class that is thread safe.

Returns:
A shared, thread safe instance of this class.

getFlowProcessor

public final FlowProcessor getFlowProcessor(java.lang.String as_config_file)
                                     throws java.lang.Exception
Returns an instance of type FlowProcessor configured based on the properties in the specified configuration file. The configuration file needs to contain two properties:
Property NameProperty Description
FLOW_PROCESSOR_DAD_FILE The full file name (path and file name) of the Data Access Definitions configuration file. This configuration file will define the SQL statements needed by the Flow Processor for normal operation. This file will only be modified by CGI-AMS. All supporting Data Access Definitions must be located in the same directory.
FLOW_SUBMITTAL_DAD_FILE The full file name (path and file name) of the Data Access Definitions configuration file. This configuration file will define the SQL statements needed by the Flow Submittals defined in the FLOW_SUBMITTAL table. This file can be modified by either CGI-AMS or the client. All supporting Data Access Definitions must be located in the same directory.
CACHE_FLOW_PROCESSOR_FLAG A value of Y indicates that the FlowProcessorFactory should cache the FlowProcessor created from the configuration file. A value of N indicates that the FlowProcessorFactory should NOT cache the FlowProcessor created from the configuration file.

Parameters:
as_config_file - The full path and file name to the confirguration file.
Returns:
An instance of type FlowProcessor.
Throws:
java.lang.Exception - If an error occurres.