Package version

Examples of version.Version


     */
    public Version checkpoint(String absPath) throws RepositoryException {
        // this is not quite correct, since the entire checkpoint operation
        // should be atomic
        Node node = session.getNode(absPath);
        Version v = (Version) node.checkin();
        node.checkout();
        return v;
    }
View Full Code Here


    /**
     * @throws RepositoryException
     */
    public void testFrozenNodeUUUID() throws RepositoryException {
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode();
        String puuid = n.getProperty(jcrUUID).getValue().getString();
        String nuuid = n.getUUID();
        assertEquals("jcr:uuid needs to be equal to the getUUID() return value.", nuuid, puuid);
    }
View Full Code Here

     * @throws RepositoryException
     */
    public void testFrozenChildNodeUUUID() throws RepositoryException {
        versionableNode.addNode("child");
        versionableNode.save();
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode().getNode("child");
        String puuid = n.getProperty(jcrUUID).getValue().getString();
        String nuuid = n.getUUID();
        assertEquals("jcr:uuid needs to be equal to the getUUID() return value.", nuuid, puuid);
    }
View Full Code Here

     */
    public void testFrozenUUUID() throws RepositoryException {
        // make versionable node referenceable
        versionableNode.addMixin(mixReferenceable);
        versionableNode.save();
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode();
        String fuuid = n.getProperty(jcrFrozenUuid).getValue().getString();
        String ruuid = versionableNode.getUUID();
        assertEquals("jcr:frozenUuid needs to be equal to the getUUID() return value.", ruuid, fuuid);
    }
View Full Code Here

     */
    public void testFrozenChildUUUID() throws RepositoryException {
        Node n1 = versionableNode.addNode("child");
        n1.addMixin(mixReferenceable);
        versionableNode.save();
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode().getNode("child");
        String fuuid = n.getProperty(jcrFrozenUuid).getValue().getString();
        String ruuid = n1.getUUID();
        assertEquals("jcr:frozenUuid needs to be equal to the getUUID() return value.", ruuid, fuuid);
    }
View Full Code Here

    /**
     * @throws RepositoryException
     */
    public void testFrozenNodeNodeType() throws RepositoryException {
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode();
        String puuid = n.getProperty(jcrPrimaryType).getValue().getString();
        String nuuid = n.getPrimaryNodeType().getName();
        assertEquals("jcr:primaryType needs to be equal to the getPrimaryNodeType() return value.", nuuid, puuid);
    }
View Full Code Here

     * @throws RepositoryException
     */
    public void testFrozenChildNodeNodeType() throws RepositoryException {
        versionableNode.addNode("child");
        versionableNode.save();
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode().getNode("child");
        String puuid = n.getProperty(jcrPrimaryType).getValue().getString();
        String nuuid = n.getPrimaryNodeType().getName();
        assertEquals("jcr:primaryType needs to be equal to the getPrimaryNodeType() return value.", nuuid, puuid);
    }
View Full Code Here

    /**
     * @throws RepositoryException
     */
    public void testFrozenNodeType() throws RepositoryException {
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode();
        String fuuid = n.getProperty("jcr:frozenPrimaryType").getValue().getString();
        String ruuid = versionableNode.getPrimaryNodeType().getName();
        assertEquals("jcr:frozenPrimaryType needs to be equal to the getPrimaryNodeType() return value.", ruuid, fuuid);
    }
View Full Code Here

     * @throws RepositoryException
     */
    public void testFrozenChildNodeType() throws RepositoryException {
        Node n1 = versionableNode.addNode("child");
        versionableNode.save();
        Version v = (Version) versionableNode.checkin();
        Node n = v.getFrozenNode().getNode("child");
        String fuuid = n.getProperty("jcr:frozenPrimaryType").getValue().getString();
        String ruuid = n1.getPrimaryNodeType().getName();
        assertEquals("jcr:frozenPrimaryType needs to be equal to the getPrimaryNodeType() return value.", ruuid, fuuid);
    }
View Full Code Here

TOP

Related Classes of version.Version

Copyright © 2018 www.massapicom. 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.