Search in sources :

Example 1 with PushNodesResultMapper

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);
}
Also used : NodeIds(com.enonic.xp.node.NodeIds) PushNodesResult(com.enonic.xp.node.PushNodesResult) PushNodesResultMapper(com.enonic.xp.lib.node.mapper.PushNodesResultMapper)

Aggregations

PushNodesResultMapper (com.enonic.xp.lib.node.mapper.PushNodesResultMapper)1 NodeIds (com.enonic.xp.node.NodeIds)1 PushNodesResult (com.enonic.xp.node.PushNodesResult)1