return CANCEL_BOTH; return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_BOTH; return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE;
/** * The cancellation only considers canceling the parent node, which corresponds * to the policy node. */ public int cancel(CancelableOperation other) throws RepositoryException { if (other instanceof Remove) { Path thisPath = ConsolidatingChangeLog.getPath(parentId, tree.getName()); Path otherPath = ConsolidatingChangeLog.getPath(((Remove) other).itemId); if (thisPath == null || otherPath == null) { return CANCEL_NONE; } if (thisPath.equals(otherPath)) { return CANCEL_BOTH; } return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE; } return CANCEL_NONE; } }
/** * The cancellation only considers canceling the parent node, which corresponds * to the policy node. */ public int cancel(CancelableOperation other) throws RepositoryException { if (other instanceof Remove) { Path thisPath = ConsolidatingChangeLog.getPath(parentId, tree.getName()); Path otherPath = ConsolidatingChangeLog.getPath(((Remove) other).itemId); if (thisPath == null || otherPath == null) { return CANCEL_NONE; } if (thisPath.equals(otherPath)) { return CANCEL_BOTH; } return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE; } return CANCEL_NONE; } }
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_BOTH; return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_BOTH; return (thisPath.isDescendantOf(otherPath)) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
boolean match = eventPath.equals(absPath); if (!match && isDeep) { match = eventPath.isDescendantOf(absPath);
boolean match = eventPath.equals(absPath); if (!match && isDeep) { match = eventPath.isDescendantOf(absPath);
boolean match = eventPath.equals(absPath); if (!match && isDeep) { match = eventPath.isDescendantOf(absPath);
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
return CANCEL_NONE; return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath) ? CANCEL_THIS : CANCEL_NONE;
boolean match = false; for (Path path : paths) { if (eventPath.equals(path) || isDeep && eventPath.isDescendantOf(path)) { match = true; break;
boolean match = false; for (Path path : paths) { if (eventPath.equals(path) || isDeep && eventPath.isDescendantOf(path)) { match = true; break;