Class PopulateStoreFromDefine<V extends BeanInitialization>
Object
org.anchoranalysis.image.bean.nonbean.init.PopulateStoreFromDefine<V>
- Type Parameters:
V- initialization-parameters for provider
public class PopulateStoreFromDefine<V extends BeanInitialization> extends Object
Helps populates a
NamedProviderStore from the contents of a Define.
Objects can be added directly (no initialization) or with initialization.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description PopulateStoreFromDefine(Define define, BeanInitializer<?> propertyInitializer, Logger logger) -
Method Summary
Modifier and Type Method Description <S extends InitializableBean<S, V>>
voidcopyInitialize(Class<?> defineClass, NamedProviderStore<S> destination)Copies objects of a particular class from the define and initializes.<S extends InitializableBean<?, V> & Provider<T>, T>
voidcopyProviderInitialize(Class<?> defineClass, NamedProviderStore<T> destination)Copies objects of a particular class (which must be aProvider) fromdefineand initializes each.<S extends AnchorBean<S>>
voidcopyWithoutInitialize(Class<?> defineClass, NamedProviderStore<S> destination)Copies objects of a particular class from the define without performing any initialization.
-
Constructor Details
-
PopulateStoreFromDefine
public PopulateStoreFromDefine(Define define, BeanInitializer<?> propertyInitializer, Logger logger)
-
-
Method Details
-
copyWithoutInitialize
public <S extends AnchorBean<S>> void copyWithoutInitialize(Class<?> defineClass, NamedProviderStore<S> destination) throws OperationFailedExceptionCopies objects of a particular class from the define without performing any initialization.- Type Parameters:
S- type of objects- Parameters:
defineClass- class to identify objects indefine.destination- where to copy to.- Throws:
OperationFailedException- if the identifier already exists, or otherwise the add operation fails.
-
copyInitialize
public <S extends InitializableBean<S, V>> void copyInitialize(Class<?> defineClass, NamedProviderStore<S> destination) throws OperationFailedExceptionCopies objects of a particular class from the define and initializes.- Type Parameters:
S- type of objects- Parameters:
defineClass- class to identify objects indefine.destination- where to copy to.- Throws:
OperationFailedException- if a copied identifier already exists, or otherwise the add operation fails.
-
copyProviderInitialize
public <S extends InitializableBean<?, V> & Provider<T>, T> void copyProviderInitialize(Class<?> defineClass, NamedProviderStore<T> destination) throws OperationFailedExceptionCopies objects of a particular class (which must be aProvider) fromdefineand initializes each.Specifically, each object will be lazily initialized once when first retrieved from the store.
- Type Parameters:
S- type of provider-objectsT- type of objects created by the provider- Parameters:
defineClass- class to identify objects indefine.destination- where to copy to.- Throws:
OperationFailedException- if a copied identifier already exists, or otherwise the add operation fails.
-