use of com.enonic.xp.impl.server.rest.model.RepoPath in project xp by enonic.
the class ImportRunnableTask method run.
@Override
public void run(final TaskId id, final ProgressReporter progressReporter) {
final RepoPath targetRepoPath = params.getTargetRepoPath();
final NodeImportResult result = getContext(params.getTargetRepoPath()).callWith(() -> {
final ImportNodesParams.Builder builder = ImportNodesParams.create().exportName(params.getExportName()).targetNodePath(targetRepoPath.getNodePath()).dryRun(params.isDryRun()).includeNodeIds(params.isImportWithIds()).includePermissions(params.isImportWithPermissions()).xsltFileName(emptyToNull(params.getXslSource())).xsltParams(params.getXslParams()).nodeImportListener(new ImportListenerImpl(progressReporter));
return this.exportService.importNodes(builder.build());
});
if (targetIsSystemRepo(targetRepoPath)) {
initializeStoredRepositories();
}
progressReporter.info(NodeImportResultJson.from(result).toString());
}
Aggregations