Package javax.jcr

Examples of javax.jcr.Node.merge()


        // make sure the ancestor will get status 'update' on merge: V is predeccessor of V'
        nodeToMerge.checkout();
        nodeToMerge.checkin();

        nodeToMerge.checkout();
        nodeToMerge.merge(workspace.getName(), true);

        // corresponding node to nvSubNode in default workspace
        Node correspondingSubNode = testRootNode.getNode(nvSubNodePath);

        // test if modification on non-v node is done according to corresponding node.
View Full Code Here


            throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
        final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        return (Iterator) executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                Node n = getNode(nodeId, sInfo);
                NodeIterator it = n.merge(srcWorkspaceName, bestEffort);
                List ids = new ArrayList();
                while (it.hasNext()) {
                    ids.add(idFactory.createNodeId(it.nextNode(),
                            sInfo.getNamePathResolver()));
                }
View Full Code Here

            EventListener el = new EListener(mergeInfo.getPropertyNameSet(), ms);
            registerEventListener(el, node.getPath());

            // todo: RFC allows multiple href elements inside the DAV:source element
            String workspaceName = getLocatorFromHref(mergeInfo.getSourceHrefs()[0]).getWorkspaceName();
            NodeIterator failed = node.merge(workspaceName, !mergeInfo.isNoAutoMerge());

            // unregister the event listener again
            unregisterEventListener(el);

            // add resources to the multistatus, that failed to be merged
View Full Code Here

            throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
        final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        return (Iterator) executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                Node n = getNode(nodeId, sInfo);
                NodeIterator it = n.merge(srcWorkspaceName, bestEffort);
                List ids = new ArrayList();
                while (it.hasNext()) {
                    ids.add(idFactory.createNodeId(it.nextNode(),
                            sInfo.getNamePathResolver()));
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.