Class CompositeMetadataProviderImpl
java.lang.Object
org.kuali.rice.krad.data.provider.impl.MetadataProviderBase
org.kuali.rice.krad.data.provider.impl.CompositeMetadataProviderImpl
- All Implemented Interfaces:
CompositeMetadataProvider,MetadataProvider,Provider
public class CompositeMetadataProviderImpl
extends MetadataProviderBase
implements CompositeMetadataProvider
This "provider" aggregates the other metadata providers given in its spring configuration.
The providers are processed in order, each one having the option to overlay information provided by earlier providers in the chain. The nature of the merge/overlay depends on the value of the mergeAction property on the returned object.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.krad.data.provider.impl.MetadataProviderBase
masterMetadataMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe list of providers this provider will use.protected voidinitializeMetadata(Collection<Class<?>> types) Performs the initialization of the provider with the given set of types.protected voidMerges attributes from the current map with those that are inherited.protected voidmergeMetadataForType(DataObjectMetadata newMetadata, DataObjectMetadata existingMetadata) Merges the metadata of two specific types.voidsetProviders(List<MetadataProvider> providers) Setter for the providers.Methods inherited from class org.kuali.rice.krad.data.provider.impl.MetadataProviderBase
getMetadataForType, getSupportedTypes, handles, isClassPersistable, provideMetadata, provideMetadataForTypes, requiresListOfExistingTypesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.data.provider.MetadataProvider
getMetadataForType, getSupportedTypes, handles, provideMetadata, provideMetadataForTypes, requiresListOfExistingTypes
-
Field Details
-
providers
-
-
Constructor Details
-
CompositeMetadataProviderImpl
public CompositeMetadataProviderImpl()
-
-
Method Details
-
initializeMetadata
Performs the initialization of the provider with the given set of types.If the list is null or empty, the provider is expected to discover the types via other means, or do nothing if the types cannot be discovered.
- Specified by:
initializeMetadatain classMetadataProviderBase
-
mergeInheritedAttributes
protected void mergeInheritedAttributes()Merges attributes from the current map with those that are inherited. -
mergeMetadataForType
protected void mergeMetadataForType(DataObjectMetadata newMetadata, DataObjectMetadata existingMetadata) Merges the metadata of two specific types.- Parameters:
newMetadata- the metadata to merge in.existingMetadata- the existing metadata to merge into.
-
getProviders
The list of providers this provider will use.They must be in the necessary order for processing. Later providers in the list.
- Specified by:
getProvidersin interfaceCompositeMetadataProvider- Returns:
- a list of all metadata providers contained within this composite provider
-
setProviders
Setter for the providers.- Parameters:
providers- the providers to set.
-