public class ComponentFactory extends Object
| Constructor and Description |
|---|
ComponentFactory(ComponentDefinition def) |
| Modifier and Type | Method and Description |
|---|---|
BaseComponent |
create(Map<String,String> attributes)
Creates a component instance from the definition using a factory context.
|
boolean |
isInactive()
Returns true if component creation has been inactivated.
|
protected void |
setIf(boolean condition)
Conditionally prevents the factory from creating a component.
|
protected void |
setImplementationClass(Class<? extends BaseComponent> clazz)
A special processor may modify the component's implementation class, as long as the
substituted class is a subclass of the original.
|
protected void |
setUnless(boolean condition)
Conditionally prevents the factory from creating a component.
|
public ComponentFactory(ComponentDefinition def)
@Component.FactoryParameter(value="impl") protected void setImplementationClass(Class<? extends BaseComponent> clazz)
clazz - Component implementation class to substitute.@Component.FactoryParameter(value="if") protected void setIf(boolean condition)
condition - If false, prevent factory from creating a component.@Component.FactoryParameter(value="unless") protected void setUnless(boolean condition)
condition - If true, prevent factory from creating a component.public boolean isInactive()
public BaseComponent create(Map<String,String> attributes)
attributes - Attribute map for initializing.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.