use of com.enonic.xp.core.impl.content.index.ContentIndexConfigFactory in project xp by enonic.
the class UpdateNodeParamsFactory method toNodeEditor.
private NodeEditor toNodeEditor(final UpdateContentTranslatorParams params) {
final Content content = params.getEditedContent();
final PropertyTree nodeData = contentDataSerializer.toUpdateNodeData(params);
final ContentIndexConfigFactory indexConfigFactory = ContentIndexConfigFactory.create().contentTypeService(contentTypeService).pageDescriptorService(pageDescriptorService).partDescriptorService(partDescriptorService).layoutDescriptorService(layoutDescriptorService).siteService(this.siteService).xDataService(this.xDataService).contentTypeName(content.getType()).page(content.getPage()).siteConfigs(content.isSite() ? ((Site) content).getSiteConfigs() : null).extraDatas(content.getAllExtraData()).language(content.getLanguage() != null ? content.getLanguage().getLanguage() : null).build();
return editableNode -> {
editableNode.indexConfigDocument = indexConfigFactory.produce();
editableNode.data = nodeData;
editableNode.manualOrderValue = content.getManualOrderValue();
editableNode.permissions = content.getPermissions();
editableNode.inheritPermissions = content.inheritsPermissions();
};
}
Aggregations