Examples of restoreByLabel()


Examples of javax.jcr.Node.restoreByLabel()

            } else if (updateInfo.getLabelName() != null) {
                String[] labels = updateInfo.getLabelName();
                if (labels.length != 1) {
                    throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid update request body: Multiple labels specified.");
                }
                node.restoreByLabel(labels[0], removeExisting);

            } else if (updateInfo.getWorkspaceHref() != null) {
                String workspaceName = getLocatorFromHref(updateInfo.getWorkspaceHref()).getWorkspaceName();
                node.update(workspaceName);
            } else {
View Full Code Here

Examples of javax.jcr.Node.restoreByLabel()

            } else if (updateInfo.getLabelName() != null) {
                String[] labels = updateInfo.getLabelName();
                if (labels.length != 1) {
                    throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid update request body: Multiple labels specified.");
                }
                node.restoreByLabel(labels[0], removeExisting);

            } else if (updateInfo.getWorkspaceHref() != null) {
                String workspaceName = getLocatorFromHref(updateInfo.getWorkspaceHref()).getWorkspaceName();
                node.update(workspaceName);
            } else {
View Full Code Here

Examples of javax.jcr.Node.restoreByLabel()

     */
    public void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
        session.checkIsAlive();

        Node n = itemManager.getNode(resolver.getQPath(absPath));
        n.restoreByLabel(versionLabel, removeExisting);
    }

    /**
     * @see javax.jcr.version.VersionManager#merge(String, String, boolean)
     */
 
View Full Code Here

Examples of javax.jcr.Node.restoreByLabel()

            } else if (updateInfo.getLabelName() != null) {
                String[] labels = updateInfo.getLabelName();
                if (labels.length != 1) {
                    throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid update request body: Multiple labels specified.");
                }
                node.restoreByLabel(labels[0], removeExisting);

            } else if (updateInfo.getWorkspaceHref() != null) {
                String workspaceName = getLocatorFromHref(updateInfo.getWorkspaceHref()).getWorkspaceName();
                node.update(workspaceName);
            } else {
View Full Code Here

Examples of javax.jcr.Node.restoreByLabel()

    /**
     * @see javax.jcr.version.VersionManager#restoreByLabel(String, String, boolean)
     */
    public void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
        Node n = itemManager.getNode(resolver.getQPath(absPath));
        n.restoreByLabel(versionLabel, removeExisting);
    }

    /**
     * @see javax.jcr.version.VersionManager#merge(String, String, boolean)
     */
 
View Full Code Here

Examples of javax.jcr.Node.restoreByLabel()

     */
    public void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
        session.checkIsAlive();

        Node n = itemManager.getNode(resolver.getQPath(absPath));
        n.restoreByLabel(versionLabel, removeExisting);
    }

    /**
     * @see javax.jcr.version.VersionManager#merge(String, String, boolean)
     */
 
View Full Code Here

Examples of javax.jcr.version.VersionManager.restoreByLabel()

                    version.getName(), "testLabel", false);

            // 3) do restore by label
            UserTransaction utx = new UserTransactionImpl(session);
            utx.begin();
            vm.restoreByLabel(node.getPath(), "testLabel", true);
            utx.commit();

            // 4) try to get the grandchild (fails if the restoring has
            // been done within a transaction)
            assertTrue(node.hasNode("child/grandchild"));
View Full Code Here

Examples of javax.jcr.version.VersionManager.restoreByLabel()

                    version.getName(), "testLabel", false);

            // 3) do restore by label
            UserTransaction utx = new UserTransactionImpl(session);
            utx.begin();
            vm.restoreByLabel(node.getPath(), "testLabel", true);
            utx.commit();

            // 4) try to get the grandchild (fails if the restoring has
            // been done within a transaction)
            assertTrue(node.hasNode("child/grandchild"));
View Full Code Here

Examples of javax.jcr.version.VersionManager.restoreByLabel()

                    version.getName(), "testLabel", false);

            // 3) do restore by label
            UserTransaction utx = new UserTransactionImpl(session);
            utx.begin();
            vm.restoreByLabel(node.getPath(), "testLabel", true);
            utx.commit();

            // 4) try to get the grandchild (fails if the restoring has
            // been done within a transaction)
            assertTrue(node.hasNode("child/grandchild"));
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.