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 Details

  • Constructor Details

    • CompositeMetadataProviderImpl

      public CompositeMetadataProviderImpl()
  • Method Details

    • initializeMetadata

      protected void initializeMetadata(Collection<Class<?>> types)
      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:
      initializeMetadata in class MetadataProviderBase
    • 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

      public List<MetadataProvider> 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:
      getProviders in interface CompositeMetadataProvider
      Returns:
      a list of all metadata providers contained within this composite provider
    • setProviders

      public void setProviders(List<MetadataProvider> providers)
      Setter for the providers.
      Parameters:
      providers - the providers to set.