Examples of removeVersion()


Examples of com.opengamma.master.config.ConfigMaster.removeVersion()

          return document.getUniqueId();
        } else {
          // Found a dead one; either our temp target unique identifiers are not unique (different repositories MUST have different schemes) or the identifier
          // sequence has been restarted/repeated and is colliding with old or dead configuration documents.
          s_logger.info("Deleting expired view definition {}", document.getUniqueId());
          master.removeVersion(document.getUniqueId());
        }
      }
    }
    final ConfigItem<ViewDefinition> item = ConfigItem.of(viewDefinition);
    item.setName(name);
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()

        VersionIterator vi = vh.getAllVersions();
        while (vi.hasNext()) {
            Version currenVersion = vi.nextVersion();
            String versionName = currenVersion.getName();
            if (!versionName.equals("jcr:rootVersion") && !versionName.equals(baseVersion)) {
                vh.removeVersion(versionName);
            }
        }
    }

    /**
 
View Full Code Here

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

    @Override
    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()

            Session session = (Session) DatabaseUtil.getSingleton().getDaoSession();           
            Node versionNode = session.getNodeByUUID(folder.getId());
            Node currentNode = session.getNodeByUUID(versionNode.getProperty("jcr:frozenUuid").getString());
              
            VersionHistory vh = currentNode.getVersionHistory();         
            vh.removeVersion(versionNode.getParent().getName());

            //Changes are persisted automatically
            //session.save();
           
        } catch (Throwable e) {
View Full Code Here

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

    @Override
    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()

        VersionIterator vi = vh.getAllVersions();
        while (vi.hasNext()) {
            Version currenVersion = vi.nextVersion();
            String versionName = currenVersion.getName();
            if (!versionName.equals("jcr:rootVersion") && !versionName.equals(baseVersion)) {
                vh.removeVersion(versionName);
            }
        }
    }

    /**
 
View Full Code Here

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

        }
        assertEquals("Number of versions", 3, names.size());
       
        // remove all versions
        for (String name: names) {
            vh.removeVersion(name);
        }

        // assert that version history is gone
        try {
            superuser.getNodeByIdentifier(id);
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
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.