- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.readWithDependencies()
方法的一些代码示例,展示了YamlReader.readWithDependencies()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlReader.readWithDependencies()
方法的具体详情如下:
包路径:info.magnolia.config.source.yaml.YamlReader
类名称:YamlReader
方法名:readWithDependencies
暂无
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void appWithAppNameConfigured() throws Exception {
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/pizzaApp.yaml"));
// THEN
Map<String, Object> map = (Map<String, Object>) result.getResult();
assertNotNull("pizzaApp", map.get("name"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void generateEmptyApp() throws Exception {
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, String> map = (Map<String, String>) result.getResult();
assertEquals("Pizzas", map.get("label"));
assertEquals("info.magnolia.ui.contentapp.ContentApp", map.get("appClass"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void appWithoutAppNameConfiguredUsesContentTypeNameAsAppName() throws Exception {
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/pizzaAppWithoutAppName.yaml"));
// THEN
Map<String, Object> map = (Map<String, Object>) result.getResult();
assertNotNull("pizza", map.get("name"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void appIsNotGeneratedWhenContentTypeIsNotFound() throws Exception {
// GIVEN
ContentTypeRegistry contentTypeRegistry = mock(ContentTypeRegistry.class);
yamlReader = new YamlReader();
AppWithContentType appWithContentType = new AppWithContentType(contentTypeRegistry, appDescriptorRegistry, yamlReader, resourceOrigin);
yamlReader.registerCustomMultiConstruct(AppWithContentType.TAG_PREFIX, appWithContentType);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, String> map = (Map<String, String>) result.getResult();
assertTrue(map.isEmpty());
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void overrideAppToChangeOrderViewsAndColumns() throws Exception {
// GIVEN
// Register override syntax
yamlReader.registerCustomConstruct(OverrideSource.TAG, new OverrideSource(null));
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/pizzaAppOverrideOrder.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/browser/workbench/contentViews").keySet(),
Matchers.contains("list", "tree"));
assertThat(nestedMapGet(result.getResult(), "subApps/browser/workbench/contentViews/tree/columns").keySet(),
Matchers.contains("path", "name"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void detailSubAppIsGeneratedBasedOnModelNodeType() throws Exception {
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, Object> nodeType = nestedMapGet(result.getResult(), "subApps/detail/editor/nodeType");
assertNotNull(nodeType.get("name"));
Map<String, Object> contentConnector = nestedMapGet(result.getResult(), "subApps/detail/contentConnector");
assertNotNull(contentConnector.get("workspace"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void mgnlContentDetailSubAppIsGeneratedIfModelDoesNotHaveNodeType() throws Exception {
// GIVEN
modelDefinition.setNodeType(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, Object> nodeType = nestedMapGet(result.getResult(), "subApps/detail/editor/nodeType");
assertEquals(NodeTypes.Content.NAME, nodeType.get("name"));
Map<String, Object> contentConnector = nestedMapGet(result.getResult(), "subApps/detail/contentConnector");
assertNotNull(contentConnector.get("workspace"));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void nameFieldIsGenerated() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/simpleModelApp.yaml", "!with-type:simpleModel");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/simpleModelApp.yaml"));
// THEN
assertEquals(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields").keySet().iterator().next(), "name");
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/name"),
allOf(
hasEntry("name", "name"),
hasEntry("type", "String"),
hasEntry("fieldType", "text")
)
);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void generateSelfReferenceLinkFields() throws Exception {
// GIVEN apps may have a different name than the content-type they use
tempFileSystemResourceOrigin.addResource("apps/thinkDifferent.yaml", "!with-type:referenceLinkFields");
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/thinkDifferent.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/lowerCamelCase"), allOf(
hasEntry("fieldType", "link"),
hasEntry("appName", "self")
));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void detailSubAppIsNotGeneratedIfModelDoesNotHaveProperties() throws Exception {
// GIVEN
modelDefinition.setProperties(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, Object> detailSubApp = nestedMapGet(result.getResult(), "subApps/detail");
assertNull(detailSubApp);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void detailSubAppIsNotGeneratedIsGeneratedIfNoModelIsProvided() throws Exception {
// GIVEN
contentTypeDefinition.setModel(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
Map<String, Object> detailSubApp = nestedMapGet(result.getResult(), "subApps/detail");
assertNull(detailSubApp);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void generateLazyPrefixedCtReferences() throws Exception {
// GIVEN apps may have a different name than the content-type they use
tempFileSystemResourceOrigin.addResource("apps/thinkDifferent.yaml", "!with-type:crossReference");
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/thinkDifferent.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/crossReference"), allOf(
hasEntry("fieldType", "link"),
hasEntry("appName", "ct:pizza"),
hasEntry("targetWorkspace", "config")
));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void browserSubAppShowsNoActionIfModelDoesNotHaveProperties() throws Exception {
// GIVEN
modelDefinition.setProperties(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
assertThatBrowserDoesNotHaveActions(result);
assertActionBarHasAvailability(result, NODE_TYPE);
assertContentViews(result);
assertContentConnectorHasNodeType(result, NODE_TYPE);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void browserSubAppShowsMgnlContentAndNoActionsIfNoModelIsProvided() throws Exception {
// GIVEN
contentTypeDefinition.setModel(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
assertThatBrowserDoesNotHaveActions(result);
assertActionBarHasAvailability(result, NodeTypes.Content.NAME);
assertContentViews(result);
assertContentConnectorHasNodeType(result, NodeTypes.Content.NAME);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void subModelNodeTypeDefaultsToMgnlContentNode() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/simpleModelApp.yaml", "!with-type:simpleModel");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/simpleModelApp.yaml"));
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address"),
hasEntry("nodeType", NodeTypes.ContentNode.NAME)
);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void browserSubAppShowsMgnContentAndItsActionsIfModelDoesNotHaveNodeType() throws Exception {
// GIVEN
modelDefinition.setNodeType(null);
// WHEN
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath(APP_PATH));
// THEN
assertThatBrowserAppHasActions(result, NodeTypes.Content.NAME);
assertActionBarHasAvailability(result, NodeTypes.Content.NAME);
assertContentViews(result);
assertThat(nestedMapGet(result.getResult(), "subApps/browser/contentConnector/nodeTypes").keySet(),
hasItems(NodeTypes.Folder.NAME, NodeTypes.Content.NAME));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void i18nOnMultiValueField() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/i18nOnMultiValueFieldApp.yaml", "!with-type:i18nOnMultiValueField");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/i18nOnMultiValueFieldApp.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address"),
hasEntry("i18n", true)
);
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address/field/fields/street"),
hasEntry("i18n", false)
);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void i18nOnCompositeField() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/i18nOnCompositeFieldApp.yaml", "!with-type:i18nOnCompositeField");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/i18nOnCompositeFieldApp.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address"),
hasEntry("i18n", true)
);
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address/fields/street"),
hasEntry("i18n", false)
);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void i18nOnCompositeFieldAndItsSubField() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/i18nOnCompositeFieldAndItsSubFieldApp.yaml", "!with-type:i18nOnCompositeFieldAndItsSubField");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/i18nOnCompositeFieldAndItsSubFieldApp.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address"),
hasEntry("i18n", true)
);
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address/fields/street"),
hasEntry("i18n", true)
);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void i18nOnBothMultiFieldAndItsSubField() throws Exception {
// WHEN
tempFileSystemResourceOrigin.addResource("apps/i18nOnMultiValueFieldAndItsSubFieldApp.yaml", "!with-type:i18nOnMultiValueFieldAndItsSubField");
YamlConversionResult result = yamlReader.readWithDependencies(resourceOrigin.getByPath("apps/i18nOnMultiValueFieldAndItsSubFieldApp.yaml"));
// THEN
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address"),
hasEntry("i18n", true)
);
assertThat(nestedMapGet(result.getResult(), "subApps/detail/editor/form/tabs/default/fields/address/field/fields/street"),
hasEntry("i18n", true)
);
}
本文整理了Java中com.esotericsoftware.yamlbeans.YamlReader.close()方法的一些代码示例,展示了YamlReader.close()的具体用法。这些代码
本文整理了Java中com.esotericsoftware.yamlbeans.YamlReader.getConfig()方法的一些代码示例,展示了YamlReader.getConfig()的具
本文整理了Java中com.esotericsoftware.yamlbeans.YamlReader.()方法的一些代码示例,展示了YamlReader.()的具体用法。这些代码示例主要来源于Git
本文整理了Java中com.esotericsoftware.yamlbeans.YamlReader.read()方法的一些代码示例,展示了YamlReader.read()的具体用法。这些代码示例
本文整理了Java中io.konig.yaml.YamlReader.()方法的一些代码示例,展示了YamlReader.()的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中org.milyn.yaml.YamlReader.initKeyMap()方法的一些代码示例,展示了YamlReader.initKeyMap()的具体用法。这些代码示例主要来源
本文整理了Java中io.konig.yaml.YamlReader.readObject()方法的一些代码示例,展示了YamlReader.readObject()的具体用法。这些代码示例主要来源于
本文整理了Java中pro.javatar.commons.reader.YamlReader.getInstance()方法的一些代码示例,展示了YamlReader.getInstance()的具
本文整理了Java中com.cognifide.qa.bb.utils.YamlReader.readFromTestResources()方法的一些代码示例,展示了YamlReader.readFr
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.readNoCast()方法的一些代码示例,展示了YamlReader.readNoCast
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.readWithDependencies()方法的一些代码示例,展示了YamlReader.
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.read()方法的一些代码示例,展示了YamlReader.read()的具体用法。这些代码
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.()方法的一些代码示例,展示了YamlReader.()的具体用法。这些代码示例主要来源于G
本文整理了Java中info.magnolia.config.source.yaml.YamlReader.registerCustomConstruct()方法的一些代码示例,展示了YamlRead
本文整理了Java中com.google.api.tools.framework.yaml.YamlReader.readYamlString()方法的一些代码示例,展示了YamlReader.rea
本文整理了Java中com.google.api.tools.framework.yaml.YamlReader.readConfig()方法的一些代码示例,展示了YamlReader.readCon
本文整理了Java中com.google.api.tools.framework.yaml.YamlReader.()方法的一些代码示例,展示了YamlReader.()的具体用法。这些代码示例主要来
本文整理了Java中org.pentaho.di.trans.steps.yamlinput.YamlReader.close()方法的一些代码示例,展示了YamlReader.close()的具体用
本文整理了Java中org.pentaho.di.trans.steps.yamlinput.YamlReader.()方法的一些代码示例,展示了YamlReader.()的具体用法。这些代码示例主要
本文整理了Java中org.pentaho.di.trans.steps.yamlinput.YamlReader.loadFile()方法的一些代码示例,展示了YamlReader.loadFile
我是一名优秀的程序员,十分优秀!