/** * @see Path#isDescendantOf(Path) */ public boolean isDescendantOf(Path other) throws IllegalArgumentException, RepositoryException { if (other == null) { throw new IllegalArgumentException("Null argument"); } return other.isAncestorOf(this); }
/** * Checks if the given event should be excluded based on the * {@link #excludePath} setting. * * @param event observation event * @return <code>true</code> if the event should be excluded, * <code>false</code> otherwise */ private boolean isExcluded(EventImpl event) { try { return excludePath != null && excludePath.isAncestorOf(event.getQPath()); } catch (MalformedPathException ex) { log.error("Error filtering events.", ex); return false; } catch (RepositoryException ex) { log.error("Error filtering events.", ex); return false; } }
/** * Checks if the given event should be excluded based on the * {@link #excludePath} setting. * * @param event observation event * @return <code>true</code> if the event should be excluded, * <code>false</code> otherwise */ private boolean isExcluded(EventImpl event) { try { return excludePath != null && excludePath.isAncestorOf(event.getQPath()); } catch (MalformedPathException ex) { log.error("Error filtering events.", ex); return false; } catch (RepositoryException ex) { log.error("Error filtering events.", ex); return false; } }
private boolean isIgnored(NodeId id) { try { final HierarchyManager hierarchyManager = handler.getContext().getHierarchyManager(); final Path path = hierarchyManager.getPath(id); for (Path excludedPath : ignoredPaths) { if (excludedPath.isEquivalentTo(path) || excludedPath.isAncestorOf(path)) { return true; } } } catch (RepositoryException ignored) { } return false; }
private boolean isExcluded(NodeId id) { try { final HierarchyManager hierarchyManager = handler.getContext().getHierarchyManager(); final Path path = hierarchyManager.getPath(id); for (Path excludedPath : excludedPaths) { if (excludedPath.isEquivalentTo(path) || excludedPath.isAncestorOf(path)) { return true; } } } catch (RepositoryException ignored) { } return false; }
private boolean isExcluded(NodeId id) { try { final HierarchyManager hierarchyManager = handler.getContext().getHierarchyManager(); final Path path = hierarchyManager.getPath(id); for (Path excludedPath : excludedPaths) { if (excludedPath.isEquivalentTo(path) || excludedPath.isAncestorOf(path)) { return true; } } } catch (RepositoryException ignored) { } return false; }
private boolean isIgnored(NodeId id) { try { final HierarchyManager hierarchyManager = handler.getContext().getHierarchyManager(); final Path path = hierarchyManager.getPath(id); for (Path excludedPath : ignoredPaths) { if (excludedPath.isEquivalentTo(path) || excludedPath.isAncestorOf(path)) { return true; } } } catch (RepositoryException ignored) { } return false; }
public SessionMoveOperation( PathResolver resolver, String srcAbsPath, String destAbsPath) throws RepositoryException { this.srcAbsPath = srcAbsPath; this.srcPath = getAbsolutePath(resolver, srcAbsPath); this.destAbsPath = destAbsPath; this.destPath = getAbsolutePath(resolver, destAbsPath); if (destPath.getIndex() != Path.INDEX_UNDEFINED) { // subscript in name element String msg = destAbsPath + ": invalid destination path (subscript in name element is not allowed)"; log.debug(msg); throw new RepositoryException(msg); } if (srcPath.isAncestorOf(destPath)) { throw new RepositoryException( "Destination path " + destAbsPath + " cannot be descendant of source path " + srcAbsPath + " in a move operation."); } }
public SessionMoveOperation( PathResolver resolver, String srcAbsPath, String destAbsPath) throws RepositoryException { this.srcAbsPath = srcAbsPath; this.srcPath = getAbsolutePath(resolver, srcAbsPath); this.destAbsPath = destAbsPath; this.destPath = getAbsolutePath(resolver, destAbsPath); if (destPath.getIndex() != Path.INDEX_UNDEFINED) { // subscript in name element String msg = destAbsPath + ": invalid destination path (subscript in name element is not allowed)"; log.debug(msg); throw new RepositoryException(msg); } if (srcPath.isAncestorOf(destPath)) { throw new RepositoryException( "Destination path " + destAbsPath + " cannot be descendant of source path " + srcAbsPath + " in a move operation."); } }
if (p1.equals(p0) || p1.isAncestorOf(p0)) { msg = "cannot remove ancestor node"; log.debug(msg);
if (p1.equals(p0) || p1.isAncestorOf(p0)) { msg = "cannot remove ancestor node"; log.debug(msg);
if (!p0.isAncestorOf(p1)) { throw new ConstraintViolationException(p + " does not satisfy the constraint '"
if (!p0.isAncestorOf(p1)) { throw new ConstraintViolationException(p + " does not satisfy the constraint '"
throws ItemExistsException, NoSuchNodeTypeException, RepositoryException { if (srcPath.isAncestorOf(destPath)) { String msg = "Invalid destination path: cannot be descendant of source path (" + LogUtil.safeGetJCRPath(destPath, resolver) + "," + LogUtil.safeGetJCRPath(srcPath, resolver) + ")"; log.debug(msg);
throws ItemExistsException, NoSuchNodeTypeException, RepositoryException { if (srcPath.isAncestorOf(destPath)) { String msg = "Invalid destination path: cannot be descendant of source path (" + LogUtil.safeGetJCRPath(destPath, resolver) + "," + LogUtil.safeGetJCRPath(srcPath, resolver) + ")"; log.debug(msg);
if (srcPath.isAncestorOf(destPath)) { String msg = safeGetJCRPath(destPath) + ": invalid destination path"
if (srcPath.isAncestorOf(destPath)) { String msg = safeGetJCRPath(destPath) + ": invalid destination path"
Path p1 = hierMgr.getPath(conflicting.getNodeId()); try { if (p1.equals(p0) || p1.isAncestorOf(p0)) { String msg = "cannot remove ancestor node"; log.debug(msg);
Path p1 = hierMgr.getPath(conflicting.getNodeId()); try { if (p1.equals(p0) || p1.isAncestorOf(p0)) { String msg = "cannot remove ancestor node"; log.debug(msg);