Package org.chenile.owiz.config.impl
Class OrchConfiguratorBase<InputType>
java.lang.Object
org.chenile.owiz.config.impl.OrchConfiguratorBase<InputType>
- Type Parameters:
InputType- .
- All Implemented Interfaces:
OrchConfigurator<InputType>
- Direct Known Subclasses:
XmlOrchConfigurator
A base implementation of OrchConfigurator that stores all the relevant information in internal variables and provides
the services as expected by OrchConfigurator. Sub classes are expected to populate the information after reading it
from various sources (such as a database or xml file)
- Author:
- rkollu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BeanFactoryAdapterprivate FlowDescriptor<InputType>private Map<String,FlowDescriptor<InputType>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidattachCommandToParent(CommandDescriptor<InputType> cd, Map<String, CommandDescriptor<InputType>> commandCatalog) lookupCommand(String componentName) This method uses the bean factory adapter to look up various bean factories.obtainCommandCatalog(String flowId) obtainCommandInfo(String commandId) obtainCommandInfo(String flowId, String commandId) This method is useful for insrumentation purposes.obtainFirstCommand(String flowId) Obtain the first command for the given flow Id.obtainFirstCommandInfo(String flowId) This method is useful for insrumentation purposes.obtainFlow(String flowId) private voidprocessChain(Map<String, CommandDescriptor<InputType>> commandCatalog) protected voidvoidsetBeanFactoryAdapter(BeanFactoryAdapter beanFactoryAdapter) toXml()Useful for debugging purposes.
-
Field Details
-
flowCatalog
-
defaultFlow
-
beanFactoryAdapter
-
-
Constructor Details
-
OrchConfiguratorBase
public OrchConfiguratorBase()
-
-
Method Details
-
obtainFirstCommand
Description copied from interface:OrchConfiguratorObtain the first command for the given flow Id. Then the execute method can be called to obtain the results.- Specified by:
obtainFirstCommandin interfaceOrchConfigurator<InputType>- Parameters:
flowId- is the name of the flow for which the first command is to be obtained- Returns:
- the first command for the passed flow Id.
-
obtainCommandInfo
Description copied from interface:OrchConfiguratorThis method is useful for insrumentation purposes.- Specified by:
obtainCommandInfoin interfaceOrchConfigurator<InputType>- Parameters:
flowId- is the name of the flow to which the command belongscommandId- is the name of the command for which the information is to be obtained- Returns:
- the command configuration information for the combination of flow and command Ids.
-
obtainFirstCommandInfo
Description copied from interface:OrchConfiguratorThis method is useful for insrumentation purposes.- Specified by:
obtainFirstCommandInfoin interfaceOrchConfigurator<InputType>- Parameters:
flowId- is the name of the flow for which the first command info is to be obtained- Returns:
- the meta data about the flow.
-
obtainCommandCatalog
-
obtainFlow
-
obtainCommandInfo
- Specified by:
obtainCommandInfoin interfaceOrchConfigurator<InputType>
-
obtainFirstCommand
- Specified by:
obtainFirstCommandin interfaceOrchConfigurator<InputType>
-
obtainFirstCommandInfo
- Specified by:
obtainFirstCommandInfoin interfaceOrchConfigurator<InputType>
-
addFlow
-
processFlows
- Throws:
OwizConfigException
-
processChain
private void processChain(Map<String, CommandDescriptor<InputType>> commandCatalog) throws OwizConfigException- Throws:
OwizConfigException
-
attachCommandToParent
private void attachCommandToParent(CommandDescriptor<InputType> cd, Map<String, CommandDescriptor<InputType>> commandCatalog) throws OwizConfigException- Throws:
OwizConfigException
-
makeCommand
protected Command<InputType> makeCommand(CommandDescriptor<InputType> cd) throws OwizConfigException - Throws:
OwizConfigException
-
lookupCommand
This method uses the bean factory adapter to look up various bean factories. Hence over-riding this class would not be required. Instead provide a bean factory adapter that does the look up.- Parameters:
componentName- .- Returns:
- Command .
- Throws:
ClassNotFoundExceptionIllegalAccessExceptionInstantiationExceptionOwizConfigException- .
-
toXml
Description copied from interface:OrchConfiguratorUseful for debugging purposes.- Specified by:
toXmlin interfaceOrchConfigurator<InputType>- Returns:
- an xml representation of the entire flow (or multiple flows if more than one are configured)
-
setBeanFactoryAdapter
-
getBeanFactoryAdapter
-