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
public class IdentifiedComponentManager<T extends IdentifiedComponent> extends Object
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
Fields Modifier and Type Field Description private Collection<T>componentsUnderlying collection.private Collection<T>initialComponentsInitial component list.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description IdentifiedComponentManager(Collection<T> freeObjects)Auto-wiring point for free-standing objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>getComponents()Gets the final collection of merged components.voidsetComponents(Collection<T> additionalObjects)Sets additional non-autowired components to merge in.
-
-
-
Field Detail
-
log
@Nonnull private org.slf4j.Logger log
Class logger.
-
initialComponents
@Nonnull @NonnullElements private Collection<T extends IdentifiedComponent> initialComponents
Initial component list.
-
components
@Nonnull @NonnullElements private Collection<T extends IdentifiedComponent> components
Underlying collection.
-
-
Constructor Detail
-
IdentifiedComponentManager
public IdentifiedComponentManager(@Nullable @NonnullElements Collection<T> freeObjects)
Auto-wiring point for free-standing objects.- Parameters:
freeObjects- free-standing objects
-
-
Method Detail
-
setComponents
public void setComponents(@Nullable @NonnullElements Collection<T> additionalObjects)
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
@Nonnull @NonnullElements public Collection<T> getComponents()
Gets the final collection of merged components.- Returns:
- merged components
-
-