AbstractJcrNode targetChild = (AbstractJcrNode)iter.nextNode(); try { Path srcPath = targetChild.correspondingNodePath(sourceWorkspaceName); AbstractJcrNode sourceChild = sourceSession.node(srcPath); targetNodesPresentInBoth.add(targetChild);
AbstractJcrNode targetChild = (AbstractJcrNode)iter.nextNode(); try { Path srcPath = targetChild.correspondingNodePath(sourceWorkspaceName); AbstractJcrNode sourceChild = sourceSession.node(srcPath); targetNodesPresentInBoth.add(targetChild);
@Override public String getCorrespondingNodePath( String workspaceName ) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException { CheckArg.isNotNull(workspaceName, "workspaceName"); checkSession(); NamespaceRegistry namespaces = this.context().getNamespaceRegistry(); return correspondingNodePath(workspaceName).getString(namespaces); }
@Override public String getCorrespondingNodePath( String workspaceName ) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException { CheckArg.isNotNull(workspaceName, "workspaceName"); checkSession(); NamespaceRegistry namespaces = this.context().getNamespaceRegistry(); return correspondingNodePath(workspaceName).getString(namespaces); }
NodeIterator merge( AbstractJcrNode targetNode, String srcWorkspace, boolean bestEffort, boolean isShallow ) throws RepositoryException { targetNode.session().checkLive(); if (session().hasPendingChanges()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowed.text()); } try { targetNode.correspondingNodePath(srcWorkspace); } catch (ItemNotFoundException infe) { // return immediately if no corresponding node exists in that workspace return JcrEmptyNodeIterator.INSTANCE; } JcrSession sourceSession = targetNode.session().spawnSession(srcWorkspace, true); MergeCommand op = new MergeCommand(targetNode, sourceSession, bestEffort, isShallow); op.execute(); targetNode.session().save(); return op.getFailures(); }
NodeIterator merge( AbstractJcrNode targetNode, String srcWorkspace, boolean bestEffort, boolean isShallow ) throws RepositoryException { targetNode.session().checkLive(); if (session().hasPendingChanges()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowed.text()); } try { targetNode.correspondingNodePath(srcWorkspace); } catch (ItemNotFoundException infe) { // return immediately if no corresponding node exists in that workspace return JcrEmptyNodeIterator.INSTANCE; } JcrSession sourceSession = targetNode.session().spawnSession(srcWorkspace, true); MergeCommand op = new MergeCommand(targetNode, sourceSession, bestEffort, isShallow); op.execute(); targetNode.session().save(); return op.getFailures(); }
srcPath = correspondingNodePath(srcWorkspace); } catch (ItemNotFoundException infe) { return;
srcPath = correspondingNodePath(srcWorkspace); } catch (ItemNotFoundException infe) { return;
private void doMerge( AbstractJcrNode targetNode ) throws RepositoryException { Path sourcePath = targetNode.correspondingNodePath(sourceWorkspaceName);
private void doMerge( AbstractJcrNode targetNode ) throws RepositoryException { Path sourcePath = targetNode.correspondingNodePath(sourceWorkspaceName);