use of com.enonic.xp.region.PartComponent in project xp by enonic.
the class ComponentInstructionTest method createFragmentPage.
private Content createFragmentPage(final String id, final String name) {
PropertyTree rootDataSet = new PropertyTree();
rootDataSet.addString("property1", "value1");
PartComponent fragmentComponent = PartComponent.create().descriptor(DescriptorKey.from("myapplication:myparttemplate")).build();
Page page = Page.create().template(PageTemplateKey.from("my-page")).fragment(fragmentComponent).build();
return Content.create().id(ContentId.from(id)).path(ContentPath.from(name)).owner(PrincipalKey.from("user:myStore:me")).displayName("My Content").modifier(PrincipalKey.from("user:system:admin")).type(ContentTypeName.fragment()).page(page).build();
}
Aggregations