Examples of Hold


Examples of com.etsy.pushbot.tokens.Hold

  public void onCommand(PushBot pushBot,
                        PushTrain pushTrain,
                        String channel,
                        String sender) {
    Hold hold = new Hold();
    hold.setMessage(this.message);
    pushTrain.addFirst(hold);
  }
View Full Code Here

Examples of javax.jcr.retention.Hold

                // by a hold on the node itself, by a hold on the parent or
                // by a deep hold on any ancestor.
                return true;
            } else {
                for (Iterator it = holds.iterator(); it.hasNext();) {
                    Hold h = (Hold) it.next();
                    if (h.isDeep()) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

Examples of javax.jcr.retention.Hold

                // by a hold on the node itself, by a hold on the parent or
                // by a deep hold on any ancestor.
                return true;
            } else {
                for (Iterator it = holds.iterator(); it.hasNext();) {
                    Hold h = (Hold) it.next();
                    if (h.isDeep()) {
                        return true;
                    }
                }
            }
        }
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

Examples of javax.jcr.retention.Hold

        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

Examples of javax.jcr.retention.Hold

        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);
        assertFalse("The hold added must not have been present before.", containsHold(holdsBefore, hold));
    }

    public void testAddHoldIsTransient() throws RepositoryException, NotExecutableException {
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);
        Hold[] holds = retentionMgr.getHolds(testNodePath);

        // revert the changes made
        superuser.refresh(false);
        Hold[] holds2 = retentionMgr.getHolds(testNodePath);
View Full Code Here

Examples of javax.jcr.retention.Hold

        assertFalse("Reverting transient changes must revert the hold added.",
                containsHold(holds2, hold));
    }
   
    public void testRemoveHold() throws RepositoryException, NotExecutableException {
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);

        Hold[] holds = retentionMgr.getHolds(testNodePath);

        retentionMgr.removeHold(testNodePath, hold);
        Hold[] holds2 = retentionMgr.getHolds(testNodePath);
View Full Code Here

Examples of javax.jcr.retention.Hold

        assertFalse("RetentionManager.removeHold should removed the hold added before.",
                containsHold(holds2, hold));
    }

    public void testRemoveHoldIsTransient() throws RepositoryException, NotExecutableException {
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);
        superuser.save();
        try {
            Hold[] holds = retentionMgr.getHolds(testNodePath);

            retentionMgr.removeHold(testNodePath, hold);
View Full Code Here

Examples of javax.jcr.retention.Hold

        }
    }

    public void testRemoveHoldFromChild() throws RepositoryException, NotExecutableException {
        String childPath = testRootNode.addNode(nodeName2, testNodeType).getPath();
        Hold hold = retentionMgr.addHold(testNodePath, getHoldName(), false);

        try {
            retentionMgr.removeHold(childPath, hold);
            fail("Removing hold from another node must fail");
        } catch (RepositoryException e) {
View Full Code Here

Examples of javax.jcr.retention.Hold

            fail("Adding a hold at an invalid path must throw RepositoryException.");
        } catch (RepositoryException e) {
            // success
        }
        try {
            Hold h = retentionMgr.addHold(testNodePath, getHoldName(), true);
            retentionMgr.removeHold(invalidPath, h);
            fail("Removing a hold at an invalid path must throw RepositoryException.");
        } catch (RepositoryException e) {
            // success
        }
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.