Package javax.jcr.retention

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


        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

        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

        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

            // 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

            // 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

            // 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

    }

    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

        }
        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

        assertTrue("getHolds doesn't return the hold added before", containsHold(holds, hold));
    }

    public void testAddHold2() throws RepositoryException, NotExecutableException {
        Hold[] holdsBefore = retentionMgr.getHolds(testNodePath);
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);
        assertFalse("The hold added must not have been present before.", containsHold(holdsBefore, hold));
    }
View Full Code Here

TOP

Related Classes of javax.jcr.retention.Hold

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.