Package net.shibboleth.ext.spring.util
Class IdentifiedComponentManager<T extends IdentifiedComponent>
java.lang.Object
net.shibboleth.ext.spring.util.IdentifiedComponentManager<T>
- Type Parameters:
T
- descriptor type
Class used for auto-wiring free-standing identified objects along with explicitly declared
bean collections.
This class marries old-style "explicit" list-based configuration of a collection of objects with annotation-driven discovery of objects of the same type.
Specializations of this class are expected to fix the type and add an Autowired constructor to receive the free-standing objects.
- Since:
- 6.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<T>
Underlying collection.private Collection<T>
Initial component list.private org.slf4j.Logger
Class logger. -
Constructor Summary
ConstructorsConstructorDescriptionIdentifiedComponentManager
(Collection<T> freeObjects) Auto-wiring point for free-standing objects. -
Method Summary
Modifier and TypeMethodDescriptionGets the final collection of merged components.void
setComponents
(Collection<T> additionalObjects) Sets additional non-autowired components to merge in.
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
initialComponents
Initial component list. -
components
Underlying collection.
-
-
Constructor Details
-
IdentifiedComponentManager
Auto-wiring point for free-standing objects.- Parameters:
freeObjects
- free-standing objects
-
-
Method Details
-
setComponents
Sets additional non-autowired components to merge in.For now, this set is prepended to any auto-wired objects and any auto-wired objects are excluded if they have the same identifier as an explicitly injected object.
- Parameters:
additionalObjects
- additional objects
-
getComponents
Gets the final collection of merged components.- Returns:
- merged components
-