use of com.enonic.xp.lib.node.mapper.PushNodesResultMapper in project xp by enonic.
the class PushNodeHandler method execute.
@Override
public Object execute() {
final NodeIds.Builder toBePushed = NodeIds.create();
final NodeIds.Builder toBeDeleted = NodeIds.create();
final NodeIds nodeIds = getNodeIds();
if (resolve) {
doResolve(nodeIds, toBePushed, toBeDeleted);
} else {
toBePushed.addAll(getNodeIds());
}
final PushNodesResult push = this.nodeService.push(toBePushed.build(), targetBranch);
final NodeIds deletedNodes = doDelete(toBeDeleted);
return new PushNodesResultMapper(push, deletedNodes);
}
Aggregations