Class PatternAndBuildBasedModelProvider

java.lang.Object
ch.tocco.nice2.model.base.impl.base.PatternAndBuildBasedModelProvider
All Implemented Interfaces:
NiceModelProvider
Direct Known Subclasses:
ModuleResourcesModelProvider

public abstract class PatternAndBuildBasedModelProvider extends Object implements NiceModelProvider
This ModelProvider has two behaviors:
First: Based on the pattern given from the SourceContribution.getPattern() and the given SourceContribution.getBasePath() it will decide if this resource needs to be parsed.
For example a pattern could be: basePath="model/entities" and the pattern="*mode.xml". So with this path and pattern, the PatternAndBuildBasedModelProvider will only pass the config-file to the NiceModelBuilder when it matches this pattern and path.

Second: Based on the type of SourceContribution.getBuilder() it will send the content to that builder. So its intended that all kinds of NiceModelBuilder are passed to this implementation. Like a FormModelBuilder and a EntityModelBuilder. But those Builders acutally build completly diffrent models. So the the PatternAndBuildBasedModelProvider decided based on the model-type, if the propriate reader is found or not.

Usage:
You contribute all configurations-reader to this instance. The contribution defines in which path and based on what pattern the configuration is then passed to those readers.
  • Field Details

  • Constructor Details

    • PatternAndBuildBasedModelProvider

      public PatternAndBuildBasedModelProvider(org.slf4j.Logger log)
  • Method Details