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
Modifier and TypeFieldDescriptionprivate BeanFactoryAdapter
private FlowDescriptor<InputType>
private Map<String,
FlowDescriptor<InputType>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
attachCommandToParent
(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 void
processChain
(Map<String, CommandDescriptor<InputType>> commandCatalog) protected void
void
setBeanFactoryAdapter
(BeanFactoryAdapter beanFactoryAdapter) toXml()
Useful for debugging purposes.
-
Field Details
-
flowCatalog
-
defaultFlow
-
beanFactoryAdapter
-
-
Constructor Details
-
OrchConfiguratorBase
public OrchConfiguratorBase()
-
-
Method Details
-
obtainFirstCommand
Description copied from interface:OrchConfigurator
Obtain the first command for the given flow Id. Then the execute method can be called to obtain the results.- Specified by:
obtainFirstCommand
in 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:OrchConfigurator
This method is useful for insrumentation purposes.- Specified by:
obtainCommandInfo
in 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:OrchConfigurator
This method is useful for insrumentation purposes.- Specified by:
obtainFirstCommandInfo
in 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:
obtainCommandInfo
in interfaceOrchConfigurator<InputType>
-
obtainFirstCommand
- Specified by:
obtainFirstCommand
in interfaceOrchConfigurator<InputType>
-
obtainFirstCommandInfo
- Specified by:
obtainFirstCommandInfo
in 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:
ClassNotFoundException
IllegalAccessException
InstantiationException
OwizConfigException
- .
-
toXml
Description copied from interface:OrchConfigurator
Useful for debugging purposes.- Specified by:
toXml
in interfaceOrchConfigurator<InputType>
- Returns:
- an xml representation of the entire flow (or multiple flows if more than one are configured)
-
setBeanFactoryAdapter
-
getBeanFactoryAdapter
-