- 使用 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)
);
}
这些指针之间有区别吗?每次通话到底发生了什么。 *p++ (*p)++, *(p)++ 最佳答案 1和3是一样的。 请记住 ++ 的后缀和一元形式。和 --有一个结果和一个副作用: x++ 的结果是
这个问题已经有答案了: difference between grep Vs cat and grep (5 个回答) 已关闭 8 年前。 我看到一个例子,其中有人这样做: cat source.tx
它曾经有效。现在,当我添加一个断点时: saveSnippet: (title, imageUrl, role) => { debugger; ... chrome (
开发.Net Web应用程序时,如果生成运行时错误,则会显示一些在Exception类中找不到的“额外”调试信息。 它显示了“源错误”部分,其中显示了代码摘录,其中行号准确显示了错误的产生位置,并显示
Firefox 中的“源”和“生成的源”有什么区别? 请举例说明。 编辑: 7 月 3 日 “搜索引擎”使用哪个来源,生成的还是生成前的? 最佳答案 Source 将显示页面加载的源(由服务器提供)。
对于具有两个不同工作表的Excel文件,我有两个OLE DB源。工作表A和工作表B。工作表A单元格I6包含日期,我想组合这两个源并在工作表B中添加一列,以将该值设置为工作表A的日期值。有可能做到吗?任
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
这是我的代码: import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: prin
我是 mysql 新手。我正在尝试 setter 工示例数据库 我尝试了 stackoverflow 中提到的一些方法,但没有帮助 谁能告诉我如何解决这个问题 SELECT 'LOADING depa
在终端中,我启动程序如下: 1) source env.sh 2) source activate enviroment 3) program --args 除了在 Pycharm 中并调试代码之外,
IntelliJ 如何知道目录是“源”还是“测试源”?如何始终将目录标记为“测试源”? build.gradle 1 apply plugin: 'java' apply plugin: 'idea'
这个问题类似于Source script to separate environment in R, not the global environment , 但有一个关键的转折。 考虑一个源另一个脚
和有什么区别--devtool source-map & eval-source-map ? 最佳答案 webpack 文档有一个方便的图表,说明这些不同的选项可能适合哪些情况。 他们显示eval-s
这个问题已经有答案了: Issue with virtualenv - cannot activate (36 个回答) 已关闭 4 年前。 venv) C:\Users\Sunil\PycharmP
在以前版本的 Akka Streams 中,groupBy 返回一个 Source 的 Source 可以具体化为一个 Source[Seq [A]]. 在 Akka Streams 2.4 中,我看
这个问题已经有答案了: Issue with virtualenv - cannot activate (36 个回答) 已关闭 4 年前。 venv) C:\Users\Sunil\PycharmP
是否可以获取 Bash 片段的源代码,但仅在特定条件成立时才实际提供其中的函数? 所以我要问的是,我可以无条件地获取目录中的所有文件,但获取的文件包含是否向采购外壳提供功能的逻辑。 例子: .bash
我无法查看 JavaCore.class 源代码,但我可以很好地使用代码。 例如,要查看方法JavaCore.create(..) 的源代码,我ctrl - click(或按f3) 在 JavaCor
-- Sample employee database -- See changelog table for details -- Copyright (C) 2007,2008, MySQL
当我在我的 IDE 中编译项目时它工作正常但是当我在 bamboo 中编译时它给我以下错误。 我已经检查过我在任务中配置的 jdk 版本是 1.6,我还尝试从 pom 中的 maven 插件强制执行
我是一名优秀的程序员,十分优秀!