Examples of Hold


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

        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
        assertEquals("Hold.getName() must return the specified name.",holdName, h.getName());
    }

    public void testHoldIsDeep() throws RepositoryException, NotExecutableException {
        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

        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), false);
        assertEquals("Hold.isDeep() must reflect the specified flag.", false, h.isDeep());
    }

    public void testHoldIsDeep2() throws RepositoryException, NotExecutableException {
        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

        super.tearDown();
    }

    public void testAddHoldTwice() throws RepositoryException, NotExecutableException {
        Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);

        try {
            retentionMgr.addHold(testNodePath, getHoldName(), true);
            fail("cannot add the same hold twice");
        } catch (RepositoryException e) {
View Full Code Here

Examples of javax.jcr.retention.Hold

            // success
        }       
    }
   
    public void testRemoveInvalidHold() throws RepositoryException, NotExecutableException {
        final Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);

        try {
            Hold invalidH = new Hold() {
                public boolean isDeep() throws RepositoryException {
                    return h.isDeep();
                }
                public String getName() throws RepositoryException {
                    return h.getName();
View Full Code Here

Examples of javax.jcr.retention.Hold

            // success
        }
    }

    public void testRemoveInvalidHold2() throws RepositoryException, NotExecutableException {
        final Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);

        try {
            Hold invalidH = new Hold() {
                public boolean isDeep() throws RepositoryException {
                    return h.isDeep();
                }
                public String getName() throws RepositoryException {
                    return "anyName";
View Full Code Here

Examples of javax.jcr.retention.Hold

            // success
        }
    }

    public void testRemoveInvalidHold3() throws RepositoryException, NotExecutableException {
        final Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);

        try {
            Hold invalidH = new Hold() {
                public boolean isDeep() throws RepositoryException {
                    return !h.isDeep();
                }
                public String getName() throws RepositoryException {
                    return h.getName();
View Full Code Here

Examples of javax.jcr.retention.Hold

    }

    public void testAddHold() throws RepositoryException, NotExecutableException {
        SessionImpl s = (SessionImpl) getHelper().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.