Interface MappingResourceHolder
- All Known Implementing Classes:
CustomMappings
public interface MappingResourceHolder
Interface that isolates methods for registering
resources for a
mapping service.
A resource may be in any mapping format whose loader is on the classpath; the file extension decides which one reads it, unless the holder names a format for all of its resources.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMappingResource(Resource resource) default StringThe format the resources of this holder are read in, for resources whose name does not identify one.Collection<? extends Resource> voidsetMappingResource(Resource resource) Registers a mapping resource.voidsetMappingResources(Collection<? extends Resource> resources) Registers a collection of mapping resources
-
Method Details
-
setMappingResource
Registers a mapping resource.- Parameters:
resource- mapping resource
-
setMappingResources
Registers a collection of mapping resources- Parameters:
resources- mapping resources
-
addMappingResource
-
getMappingResources
Collection<? extends Resource> getMappingResources()- Returns:
- immutable registered mapping resources
-
getMappingFormat
The format the resources of this holder are read in, for resources whose name does not identify one. One holder groups the mappings of one module, which are typically all in the same format, so it is declared here rather than per resource.- Returns:
- a
format id, ornullto dispatch each resource by its file extension
-