Examples of Hold


Examples of javax.jcr.retention.Hold

            fail("Adding a hold for a non-existing node must throw PathNotFoundException.");
        } catch (PathNotFoundException e) {
            // success
        }
        try {
            Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
            retentionMgr.removeHold(invalidPath, h);
            fail("Removing a hold at a non-existing node must throw PathNotFoundException.");
        } catch (PathNotFoundException e) {
            // success
        }
View Full Code Here

Examples of javax.jcr.retention.Hold

            fail("Adding a hold for a non-existing node must throw PathNotFoundException.");
        } catch (PathNotFoundException e) {
            // success
        }
        try {
            Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
            retentionMgr.removeHold(propPath, h);
            fail("Removing a hold at a non-existing node must throw PathNotFoundException.");
        } catch (PathNotFoundException e) {
            // success
        }
View Full Code Here

Examples of javax.jcr.retention.Hold

        }
    }

    public void testRemoveHoldOnLockedNode() throws NotExecutableException, RepositoryException {
        Node child = getLockedChildNode();
        Hold h = retentionMgr.addHold(child.getPath(), getHoldName(), false);
        testRootNode.save();

        javax.jcr.Session otherS = helper.getSuperuserSession();
        try {
            RetentionManager rmgr = getRetentionManager(otherS);
View Full Code Here

Examples of javax.jcr.retention.Hold

    public void testRemoveHoldOnCheckedInNode() throws NotExecutableException, RepositoryException {
        Node vn = getVersionableChildNode();
        vn.checkout();
        Node n = vn.addNode(nodeName2);
        Hold h = retentionMgr.addHold(n.getPath(), getHoldName(), false);
        superuser.save();

        // checkin on the parent node make the hold-containing node checked-in.
        vn.checkin();
View Full Code Here

Examples of javax.jcr.retention.Hold

        return child;
    }

    public void testHoldGetName() throws RepositoryException, NotExecutableException {
        String holdName = getHoldName();
        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), false);
        assertEquals("Hold.getName() must return the specified name.",holdName, h.getName());
    }
View Full Code Here

Examples of javax.jcr.retention.Hold

        assertEquals("Hold.getName() must return the specified name.",holdName, h.getName());
    }

    public void testHoldGetName2() throws RepositoryException, NotExecutableException {
        String holdName = getHoldName();
        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
        assertEquals("Hold.getName() must return the specified name.",holdName, h.getName());
    }
View Full Code Here

Examples of javax.jcr.retention.Hold

        assertEquals("Hold.getName() must return the specified name.",holdName, h.getName());
    }

    public void testHoldIsDeep() throws RepositoryException, NotExecutableException {
        String holdName = getHoldName();
        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), false);
        assertEquals("Hold.isDeep() must reflect the specified flag.", false, h.isDeep());
    }
View Full Code Here

Examples of javax.jcr.retention.Hold

        assertEquals("Hold.isDeep() must reflect the specified flag.", false, h.isDeep());
    }

    public void testHoldIsDeep2() throws RepositoryException, NotExecutableException {
        String holdName = getHoldName();
        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
        assertEquals("Hold.isDeep() must reflect the specified flag.", true, h.isDeep());
    }
View Full Code Here

Examples of javax.jcr.retention.Hold

    }

    public void testAddHold() throws RepositoryException, NotExecutableException {
        SessionImpl s = (SessionImpl) helper.getSuperuserSession();
        RetentionRegistry re = s.getRetentionRegistry();
        Hold h = null;
        try {
            h = retentionMgr.addHold(childN2.getPath(), getHoldName(), false);
            // hold must not be effective yet
            assertFalse(re.hasEffectiveHold(s.getQPath(childN2.getPath()), false));
View Full Code Here

Examples of javax.jcr.retention.Hold

        }
        return false;
    }

    public void testAddHold() throws RepositoryException, NotExecutableException {
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);
        Hold[] holds = retentionMgr.getHolds(testNodePath);
        assertTrue("getHolds must return the hold added before.", holds.length >= 1);
        assertTrue("getHolds doesn't return the hold added before", containsHold(holds, hold));
    }
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.