public class LinkedBeanRegistry extends SimpleBeanRegistry
BeanRegistry that will attempt to find a bean value in an
existing BeanDirectory if it hasn't been registered with this
registry.RESERVED_CHARACTERS| Constructor and Description |
|---|
LinkedBeanRegistry(ArooaSession existingSession)
A constructor that takes takes the existing directory and tools
from the given session.
|
LinkedBeanRegistry(BeanDirectory existingDirectory,
PropertyAccessor propertyAccessor,
ArooaConverter converter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> java.lang.Iterable<T> |
getAllByType(java.lang.Class<T> type)
Get all objects in the directory of the required type.
|
java.lang.String |
getIdFor(java.lang.Object bean)
Find the id for the given component.
|
java.lang.Object |
lookup(java.lang.String path)
First try our local registry then the parent.
|
<T> T |
lookup(java.lang.String path,
java.lang.Class<T> required)
Get a value, as above, but also convert it into to given
type.
|
getAllIds, register, remove, toStringpublic LinkedBeanRegistry(BeanDirectory existingDirectory, PropertyAccessor propertyAccessor, ArooaConverter converter)
existingDirectory - propertyAccessor - converter - public LinkedBeanRegistry(ArooaSession existingSession)
existingSession - public java.lang.Object lookup(java.lang.String path)
lookup in interface BeanDirectorylookup in class SimpleBeanRegistrypath - The path.public <T> T lookup(java.lang.String path,
java.lang.Class<T> required)
throws ArooaConversionException
BeanDirectoryConversion in the directory is required when the client code has no access to the converters required, for instance in a nested Oddjob.
lookup in interface BeanDirectorylookup in class SimpleBeanRegistryT - The required type.path - The full pathrequired - The required type.ArooaConversionException - If an object can be found but
it can't be converted into the required type.public java.lang.String getIdFor(java.lang.Object bean)
SimpleBeanRegistrygetIdFor in interface BeanDirectorygetIdFor in class SimpleBeanRegistrybean - The component.public <T> java.lang.Iterable<T> getAllByType(java.lang.Class<T> type)
BeanDirectoryWhy an Iterable not a Collection or Set? It was thought that this would force read only use. Maybe it should be an array...
getAllByType in interface BeanDirectorygetAllByType in class SimpleBeanRegistryT - The required type.type - The type.