Class GenericFactory
- All Implemented Interfaces:
org.apache.commons.digester3.ObjectCreationFactory<Object>
,IDigesterRuleAware
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
JobFactory
,ListenerFactory
,ParameterFactory
This factory uses the name of the current element for name of the bean, instead of hard-wiring a bean name. The name of current element is prefixed with the string "proto-", to prevent unwanted auto-wiring cascaded of other prototype beans defined in the Spring Factory which are supposed to be defined in the IBIS Configuration File.
If a className attribute is specified in the configuration file, then
this is used together with the bean-name to find the bean to be
instantiated from the Spring Factory (see the rules laid out in
AbstractSpringPoweredDigesterFactory
.
In particular, the bean-name is ignored when the class-name is specified
and the Spring Factory contains exactly 1 bean-definition for that
class.
This is useful for those kinds of rules in the digester-rules.xml where the className was always mandatory in older versions, but also for those rules where className is never specified and only 1 possible implementation exists.
NB: The Apache Digester cannot read a factory-create-rule from XML and supply parameters to the factory created from the XML digester-rules, so there is no way to configure a factory instance with a bean-name from the digester-rules.
- Since:
- 4.8
- Author:
- Tim van der Leeuw
-
Field Summary
Fields inherited from class org.frankframework.configuration.digester.AbstractSpringPoweredDigesterFactory
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn name of current element prefixed with the string "proto-" as bean-name.Methods inherited from class org.frankframework.configuration.digester.AbstractSpringPoweredDigesterFactory
copyAttrsToMap, createBeanAndAutoWire, createObject, createObject, getApplicationContext, isPrototypesOnly, setApplicationContext, setDigesterRule
Methods inherited from class org.apache.commons.digester3.AbstractObjectCreationFactory
getDigester, setDigester
-
Constructor Details
-
GenericFactory
public GenericFactory()
-
-
Method Details
-
getSuggestedBeanName
Return name of current element prefixed with the string "proto-" as bean-name.- Specified by:
getSuggestedBeanName
in classAbstractSpringPoweredDigesterFactory
- See Also:
-