info.magnolia.config.source.yaml.YamlConfigurationSource.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中info.magnolia.config.source.yaml.YamlConfigurationSource.<init>()方法的一些代码示例,展示了YamlConfigurationSource.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlConfigurationSource.<init>()方法的具体详情如下:
包路径:info.magnolia.config.source.yaml.YamlConfigurationSource
类名称:YamlConfigurationSource
方法名:<init>

YamlConfigurationSource.<init>介绍

暂无

代码示例

代码示例来源:origin: info.magnolia.core/magnolia-configuration

@Override
public void bindTo(Registry<?> registry) {
  final Pattern pathPattern = validatePathPattern(this.pathPattern);
  if (registry == null) {
    throw new NullPointerException("Must pass a registry instance");
  }
  new YamlConfigurationSource<>(origin, map2BeanTransformer, registry, pathPattern, yamlReader, magnoliaConfigurationProperties, moduleRegistry).start();
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

private <T> YamlConfigurationSource<T> mapRegistryWithYamlFolder(AbstractRegistry registry, String pathPattern) {
  YamlConfigurationSource yamlSource = new YamlConfigurationSource<T>(resourceOrigin,
      map2BeanTransformer,
      registry,
      Pattern.compile(pathPattern),
      yamlReader,
      magnoliaProperties,
      moduleRegistry);
  yamlSource.start();
  return yamlSource;
}

代码示例来源:origin: info.magnolia.core/magnolia-configuration

private YamlConfigurationSource<DummyThing> newDummyYamlSource(String pathPattern, DummyRegistry registry, ResourceOrigin resourceOrigin) throws IOException {
  return new YamlConfigurationSource<>(resourceOrigin, map2BeanTransformer, registry, Pattern.compile(pathPattern), new YamlReader(), magnoliaConfigurationProperties.get(), mock(ModuleRegistry.class));
}

代码示例来源:origin: info.magnolia.core/magnolia-configuration

@Before
public void setUp() throws Exception {
  final ModuleRegistry moduleRegistry = mock(ModuleRegistry.class);
  when(moduleRegistry.getModuleNames()).thenReturn(Sets.newHashSet("info/magnolia/config/source/yaml/samples/decorators/fooModule"));
  this.registry = new DummyRegistry();
  this.resourceOrigin.mountClasspathLocation("info/magnolia/config/source/yaml/samples/decorators", "/foo/decoration");
  MagnoliaConfigurationProperties magnoliaProperties = mock(MagnoliaConfigurationProperties.class);
  YamlConfigurationSource<DummyThing> yamlSource =
      new YamlConfigurationSource<>(mock(ResourceOrigin.class),
          map2BeanTransformer,
          registry,
          Pattern.compile("/(fooModule)/(.*)\\.yaml"),
          new YamlReader(),
          magnoliaProperties,
          mock(ModuleRegistry.class));
  yamlSource.start();
  yamlSource.loadAndRegister(singleResource(foo, "/fooModule/a.yaml", getResource(DEFINITION_RESOURCE).openStream()));
  this.definitionReference = new DefaultDefinitionReference("fooModule", "a", "a");
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Before
public void setUp() throws Exception {
  tempFileSystemResourceOrigin.mountClasspathLocation("fooModule", "");
  resourceOrigin = tempFileSystemResourceOrigin.get();
  ComponentsTestUtil.setImplementation(ContentTypeDefinition.class, ConfiguredContentTypeDefinition.class);
  ComponentsTestUtil.setImplementation(DataSourceDefinition.class, ConfiguredJcrDataSourceDefinition.class);
  ComponentsTestUtil.setImplementation(ModelDefinition.class, ConfiguredJcrModelDefinition.class);
  ComponentsTestUtil.setImplementation(SubModelDefinition.class, ConfiguredJcrSubModelDefinition.class);
  ComponentsTestUtil.setImplementation(PropertyDefinition.class, ConfiguredPropertyDefinition.class);
  moduleRegistry = mock(ModuleRegistry.class);
  appDescriptorRegistry = mock(AppDescriptorRegistry.class);
  eventBus = mock(EventBus.class);
  contentTypeRegistry = new ContentTypeRegistry(moduleRegistry, eventBus);
  yamlReader = new YamlReader();
  AppWithContentType appWithContentType = new AppWithContentType(contentTypeRegistry, appDescriptorRegistry, yamlReader, resourceOrigin);
  yamlReader.registerCustomMultiConstruct(AppWithContentType.TAG_PREFIX, appWithContentType);
  map2BeanTransformer = new Map2BeanTransformer(Components.getComponentProvider(), new TypeMappingImpl(), new PreConfiguredBeanUtils(), new BeanTypeResolver());
  magnoliaProperties = mock(MagnoliaConfigurationProperties.class);
  YamlConfigurationSource<ContentTypeDefinition> contentTypesYamlSource =
      new YamlConfigurationSource<>(resourceOrigin,
          map2BeanTransformer,
          contentTypeRegistry,
          Pattern.compile("/contentTypes/(.*)\\.yaml"),
          new YamlReader(),
          magnoliaProperties,
          moduleRegistry);
  contentTypesYamlSource.start();
  contentTypeDefinition = (ConfiguredContentTypeDefinition) contentTypeRegistry.getProvider("pizza").get();
  modelDefinition = (ConfiguredJcrModelDefinition) contentTypeDefinition.getModel();
}

代码示例来源:origin: info.magnolia.core/magnolia-configuration

new YamlConfigurationSource<>(
    resourceOrigin.get(),
    map2BeanTransformer,

代码示例来源:origin: info.magnolia.core/magnolia-configuration

final JcrConfigurationSource<DummyThing> source = new JcrConfigurationSource<>(registry, "dummies", Predicate.TRUE, moduleRegistry, map2BeanTransformer);
final YamlConfigurationSource<DummyThing> yamlSource =
    new YamlConfigurationSource<>(mock(ResourceOrigin.class),
        map2BeanTransformer,
      registry,

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

new YamlConfigurationSource<>(resourceOrigin,
    map2BeanTransformer,
    appDescriptorRegistry,

相关文章