Interface MetadataProvider
- All Superinterfaces:
Provider
- All Known Subinterfaces:
CompositeMetadataProvider,JpaMetadataProvider
- All Known Implementing Classes:
AnnotationMetadataProviderImpl,CompositeMetadataProviderImpl,EclipseLinkJpaMetadataProviderImpl,JpaMetadataProviderImpl,MetadataProviderBase,SpringMetadataProviderImpl
Defines metadata SPI for data providers.
These providers extract metadata from their sources (JPA Annotations, Custom krad-data anotations, Spring configuration, Message Services) to provide this information for use by the application and framework layers.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptiongetMetadataForType(Class<?> dataObjectType) Obtains the metadata for a specific data type.Collection<Class<?>> Returns a complete list of the data object types which will return data from this provider.booleanIndicates whether or not this provider handles metadata for the given data object type.Provides the metadata available from this provider for all of it's data objects.provideMetadataForTypes(Collection<Class<?>> types) Provides the metadata for the given types.booleanFlag which allows the service to indicate that it requires knowledge of previously discovered persistable entities.
-
Method Details
-
provideMetadata
Map<Class<?>,DataObjectMetadata> provideMetadata()Provides the metadata available from this provider for all of it's data objects.- Returns:
- the metadata provided by this provider.
-
provideMetadataForTypes
Provides the metadata for the given types.- Parameters:
types- the list of types for which to get the metadata.- Returns:
- a Map of the data object types to their metadata.
-
getMetadataForType
Obtains the metadata for a specific data type.- Parameters:
dataObjectType- the type for which to get the metadata.- Returns:
- The metadata for the given data object or null if no metadata is available for the given type.
- Throws:
IllegalArgumentException- if the data object type is null.
-
handles
Indicates whether or not this provider handles metadata for the given data object type.- Parameters:
type- the data object type to check.- Returns:
- true if this provider will return any data for the given type, false otherwise
-
getSupportedTypes
Collection<Class<?>> getSupportedTypes()Returns a complete list of the data object types which will return data from this provider.- Returns:
- A non-null list of all the data object types supported by this provider.
-
requiresListOfExistingTypes
boolean requiresListOfExistingTypes()Flag which allows the service to indicate that it requires knowledge of previously discovered persistable entities.That is, the service is designed only to process existing objects and not to create new ones.
- Returns:
- true if this provider will fail when passed an empty list of entity types
-