Examples of removeVersion()


Examples of javax.jcr.version.VersionHistory.removeVersion()

                String name = Text.getName(itemPath);
                // remove index
                if (name.endsWith("]")) {
                    name = name.substring(0, name.lastIndexOf('['));
                }
                versionHistory.removeVersion(name);
            } catch (RepositoryException e) {
                throw new JcrDavException(e);
            }
        } else {
            throw new DavException(DavServletResponse.SC_NOT_FOUND);
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

     */
    public void removeMember(DavResource member) throws DavException {
        if (exists()) {
            VersionHistory versionHistory = (VersionHistory) item;
            try {
                versionHistory.removeVersion(getItemName(member.getLocator().getRepositoryPath()));
            } catch (RepositoryException e) {
                throw new JcrDavException(e);
            }
        } else {
            throw new DavException(DavServletResponse.SC_NOT_FOUND);
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

                            names.add(v.getName());
                        }
                    }
                    Collections.reverse(names);
                    for (String name : names) {
                        history.removeVersion(name);
                    }
                }
            }
        } catch (Exception e) {
            throw new ServletException(e);
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

      checkVersionHistory(testVersionable, 4);

      // -------- play with version remove --------

      // we have v4 as base version, REMOVE v1 from history
      vHistory.removeVersion(vHistory.getVersionByLabel("ver.1").getName());
      if (log.isDebugEnabled())
         log.debug("===== ver.1 removed =====");
      showVersionable(testVersionable);
      checkVersionHistory(testVersionable, 3);
      try
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        assertThat(v4, is(notNullValue()));
        assertThat(v5, is(notNullValue()));
        assertThat(v6, is(notNullValue()));

        // Remove the 3rd version (that is, i=3) ...
        history.removeVersion(versionName);

        if (print) System.out.println("After (same history used to remove): \n" + history);
        assertThat(history.getAllLinearVersions().getSize(), is(5L));

        // Get the versions using the history node we already have ...
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        assertThat(v4, is(notNullValue()));
        assertThat(v5, is(notNullValue()));
        assertThat(v6, is(notNullValue()));

        // Remove the 3rd version (that is, i=3) ...
        history.removeVersion(versionName);

        if (print) System.out.println("After (same history used to remove): \n" + history);
        assertThat(history.getAllLinearVersions().getSize(), is(5L));

        // Get the versions using the history node we already have ...
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        n.remove();
        testRootNode.save();
        assertExists(session, vhUuid);

        // Remove the first version
        vh.removeVersion(v10.getName());
        assertExists(session, vhUuid);

        // Remove the second and last version
        vh.removeVersion(v11.getName());
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        // Remove the first version
        vh.removeVersion(v10.getName());
        assertExists(session, vhUuid);

        // Remove the second and last version
        vh.removeVersion(v11.getName());

        try {
            session.getNodeByUUID(vhUuid);
            fail("Orphan version history must have been removed");
        } catch (ItemNotFoundException e) {
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        testRootNode.save();
        assertExists(session, vhUuid);
        assertExists(otherWsSession, vhUuid);

        // Remove the first version
        vh.removeVersion(v10.getName());
        assertExists(session, vhUuid);
        assertExists(otherWsSession, vhUuid);

        // Remove cloned node
        clonedNode.remove();
View Full Code Here

Examples of javax.jcr.version.VersionHistory.removeVersion()

        otherWsRootNode.save();
        assertExists(session, vhUuid);
        assertExists(otherWsSession, vhUuid);

        // Remove the last version
        vh.removeVersion(v11.getName());

        try {
            session.getNodeByUUID(vhUuid);
            fail("Orphan version history must have been removed from the default workspace");
        } catch (ItemNotFoundException e) {
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.