use of com.enonic.xp.content.DuplicateContentsResult in project xp by enonic.
the class ContentServiceImpl method duplicate.
@Override
public DuplicateContentsResult duplicate(final DuplicateContentParams params) {
final DuplicateContentsResult result = DuplicateContentCommand.create(params).nodeService(this.nodeService).contentTypeService(this.contentTypeService).translator(this.translator).eventPublisher(this.eventPublisher).duplicateListener(params.getDuplicateContentListener()).build().execute();
contentAuditLogSupport.duplicate(params, result);
return result;
}
use of com.enonic.xp.content.DuplicateContentsResult in project xp by enonic.
the class ContentServiceImplTest_duplicate method doDuplicateContent.
private Content doDuplicateContent(final Content content, final Boolean includeChildren) {
final DuplicateContentParams params = DuplicateContentParams.create().contentId(content.getId()).includeChildren(includeChildren).build();
final DuplicateContentsResult result = contentService.duplicate(params);
return this.contentService.getById(result.getDuplicatedContents().first());
}
use of com.enonic.xp.content.DuplicateContentsResult in project xp by enonic.
the class ContentServiceImplTest_publish_update_publishedTime method doDuplicateContent.
private Content doDuplicateContent(final Content rootContent) {
final DuplicateContentParams params = DuplicateContentParams.create().contentId(rootContent.getId()).build();
final DuplicateContentsResult result = contentService.duplicate(params);
return this.contentService.getById(result.getDuplicatedContents().first());
}
Aggregations