use of com.adobe.cq.wcm.core.components.it.seljup.util.components.list.v1.List in project kie-wb-common by kiegroup.
the class ListPropertyConverter method wbFromDMN.
public static List wbFromDMN(final org.kie.dmn.model.v1_1.List dmn) {
Id id = new Id(dmn.getId());
Description description = new Description(dmn.getDescription());
QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
java.util.List<Expression> expression = new ArrayList<>();
for (org.kie.dmn.model.v1_1.Expression e : dmn.getExpression()) {
Expression eConverted = ExpressionPropertyConverter.wbFromDMN(e);
expression.add(eConverted);
}
List result = new List(id, description, typeRef, expression);
return result;
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.list.v1.List in project kie-wb-common by kiegroup.
the class ListPropertyConverter method dmnFromWB.
public static org.kie.dmn.model.v1_1.List dmnFromWB(final List wb) {
org.kie.dmn.model.v1_1.List result = new org.kie.dmn.model.v1_1.List();
result.setId(wb.getId().getValue());
result.setDescription(wb.getDescription().getValue());
QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
for (Expression e : wb.getExpression()) {
org.kie.dmn.model.v1_1.Expression eConverted = ExpressionPropertyConverter.dmnFromWB(e);
result.getExpression().add(eConverted);
}
return result;
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.list.v1.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListIT method setup.
protected void setup() throws ClientException {
// add 2 tags
tag1Path = Commons.addTag(adminClient, tag1);
tag2Path = Commons.addTag(adminClient, tag2);
// create a separate parent page
parentPath = authorClient.createPage("parent_page", "parent_page", rootPage, defaultPageTemplate).getSlingPath();
// add page 1
page1Path = authorClient.createPage("page_1", "page_1", parentPath, defaultPageTemplate).getSlingPath();
// set tag on the page
String[] tags = new String[] { tag1 };
Commons.setTagsToPage(adminClient, page1Path, tags, 200);
HashMap<String, String> data = new HashMap<String, String>();
data.put("jcr:description", description);
Commons.editNodeProperties(adminClient, page1Path + "/jcr:content", data);
// add page 2
page2Path = authorClient.createPage("page_2", "page_2", parentPath, defaultPageTemplate).getSlingPath();
// add a text component
String text1Path = Commons.addComponent(adminClient, Commons.rtText_v1, page2Path + Commons.relParentCompPath, "text", null);
// set some text in the text component
data.clear();
data.put("text", searchValue);
Commons.editNodeProperties(adminClient, text1Path, data);
// create subpage for page 2
page21Path = authorClient.createPage("sub_2_1", "sub_2_1", page2Path, defaultPageTemplate).getSlingPath();
// create second sub page for page 2
page22Path = authorClient.createPage("sub_2_2", "sub_2_2", page2Path, defaultPageTemplate).getSlingPath();
// add page 3
page3Path = authorClient.createPage("page_3", "page_3", parentPath, defaultPageTemplate).getSlingPath();
// set 2 tags on the page
tags = new String[] { tag1, tag2 };
Commons.setTagsToPage(adminClient, page3Path, tags, 200);
// create page 4
page4Path = authorClient.createPage("page_4", "page_4", parentPath, defaultPageTemplate).getSlingPath();
// create a sub page for page 4
String page41Path = authorClient.createPage("sub_4_1", "sub_4_1", page4Path, defaultPageTemplate).getSlingPath();
// add a text component
String text2Path = Commons.addComponent(adminClient, Commons.rtText_v1, page41Path + Commons.relParentCompPath, "text", null);
// set some text in the text component
data.clear();
data.put("text", searchValue);
Commons.editNodeProperties(adminClient, text2Path, data);
// create page 5
page5Path = authorClient.createPage("page_5", "page_5", parentPath, defaultPageTemplate).getSlingPath();
// set tag on the page
tags = new String[] { tag2 };
Commons.setTagsToPage(adminClient, page5Path, tags, 200);
// create the test page containing the list component, store page path in 'testPagePath'
testPage = authorClient.createPage("testPage", "Test Page Title", rootPage, defaultPageTemplate).getSlingPath();
// create a proxy component
proxyPath = Commons.createProxyComponent(adminClient, listRT, Commons.proxyPath, null, null);
// add the component to test page
compPath = Commons.addComponent(adminClient, proxyPath, testPage + Commons.relParentCompPath, "list", null);
// open test page in page editor
editorPage = new PageEditorPage(testPage);
editorPage.open();
list = new List();
}
Aggregations