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 Details

    • setMappingResource

      void setMappingResource(Resource resource)
      Registers a mapping resource.
      Parameters:
      resource - mapping resource
    • setMappingResources

      void setMappingResources(Collection<? extends Resource> resources)
      Registers a collection of mapping resources
      Parameters:
      resources - mapping resources
    • addMappingResource

      void addMappingResource(Resource resource)
    • getMappingResources

      Collection<? extends Resource> getMappingResources()
      Returns:
      immutable registered mapping resources
    • getMappingFormat

      default String 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, or null to dispatch each resource by its file extension