Search in sources :

Example 1 with DuplicateContentParams

use of com.enonic.xp.content.DuplicateContentParams 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());
}
Also used : DuplicateContentParams(com.enonic.xp.content.DuplicateContentParams) DuplicateContentsResult(com.enonic.xp.content.DuplicateContentsResult)

Example 2 with DuplicateContentParams

use of com.enonic.xp.content.DuplicateContentParams 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());
}
Also used : DuplicateContentParams(com.enonic.xp.content.DuplicateContentParams) DuplicateContentsResult(com.enonic.xp.content.DuplicateContentsResult)

Aggregations

DuplicateContentParams (com.enonic.xp.content.DuplicateContentParams)2 DuplicateContentsResult (com.enonic.xp.content.DuplicateContentsResult)2