use of com.enonic.xp.node.ImportNodeParams in project xp by enonic.
the class ImportContentCommand method doExecute.
private ImportContentResult doExecute() {
final Node importNode = ImportContentFactory.create().params(params).contentDataSerializer(contentDataSerializer).build().execute();
final ImportNodeParams importNodeParams = ImportNodeParams.create().importNode(importNode).binaryAttachments(params.getBinaryAttachments()).insertManualStrategy(params.getInsertManualStrategy()).dryRun(params.isDryRun()).importPermissions(params.isImportPermissions()).importPermissionsOnCreate(params.isImportPermissionsOnCreate()).build();
final ImportNodeResult result = nodeService.importNode(importNodeParams);
return ImportContentResult.create().content(translator.fromNode(result.getNode(), false)).build();
}
use of com.enonic.xp.node.ImportNodeParams in project xp by enonic.
the class NodeImporter method importNode.
private ImportNodeResult importNode(final VirtualFile nodeFolder, final ProcessNodeSettings.Builder processNodeSettings, final Node serializedNode, final NodePath importNodePath) {
final BinaryAttachments binaryAttachments = processBinaryAttachments(nodeFolder, serializedNode);
final ProcessNodeSettings settings = processNodeSettings.build();
final Node importNode = ImportNodeFactory.create().importNodeIds(this.importNodeIds).importPermissions(this.importPermissions).serializedNode(serializedNode).importPath(importNodePath).processNodeSettings(settings).build().execute();
final ImportNodeParams importNodeParams = ImportNodeParams.create().importNode(importNode).binaryAttachments(binaryAttachments).insertManualStrategy(settings.getInsertManualStrategy()).dryRun(this.dryRun).importPermissions(this.importPermissions).importPermissionsOnCreate(this.importPermissions).build();
return this.nodeService.importNode(importNodeParams);
}
Aggregations