/** * @param change the change being processed * @return <code>true</code> if there are no UUIDs to match or change UUID matches */ private boolean acceptBasedOnUuid( AbstractNodeChange change ) { // JSR_283#12.5.3.4.2 return this.uuids == null || (!this.uuids.isEmpty() && this.uuids.contains(nodeIdentifier(change.getKey()))); }
private Path parentNodePathOfChange( AbstractNodeChange change ) { Path changePath = change.getPath(); if (change instanceof AbstractPropertyChange) { return changePath; } return changePath.isRoot() ? changePath : changePath.getParent(); }
Path newPath = nodeChange.getPath(); String nodeId = nodeIdentifier(nodeChange.getKey()); NodeType primaryType = nodeType(nodeChange.getPrimaryType()); Set<NodeType> mixinTypes = nodeTypes(nodeChange.getMixinTypes());
if (change instanceof AbstractNodeChange) { AbstractNodeChange anc = (AbstractNodeChange) change; Name primaryType = anc.getPrimaryType(); Set<Name> mixinTypes = anc.getMixinTypes(); if (!matchesType(primaryType, mixinTypes)) { continue; f.getCause()); lastKey = anc.getKey(); lastPrimaryType = anc.getPrimaryType(); lastMixinTypes = anc.getMixinTypes();
Path newPath = nodeChange.getPath(); String nodeId = nodeIdentifier(nodeChange.getKey()); NodeType primaryType = nodeType(nodeChange.getPrimaryType()); Set<NodeType> mixinTypes = nodeTypes(nodeChange.getMixinTypes());
if (change instanceof AbstractNodeChange) { AbstractNodeChange anc = (AbstractNodeChange) change; Name primaryType = anc.getPrimaryType(); Set<Name> mixinTypes = anc.getMixinTypes(); if (!matchesType(primaryType, mixinTypes)) { continue; f.getCause()); lastKey = anc.getKey(); lastPrimaryType = anc.getPrimaryType(); lastMixinTypes = anc.getMixinTypes();
private Path parentNodePathOfChange( AbstractNodeChange change ) { Path changePath = change.getPath(); if (change instanceof AbstractPropertyChange) { return changePath; } return changePath.isRoot() ? changePath : changePath.getParent(); }
/** * @param change the change being processed * @return <code>true</code> if there are no UUIDs to match or change UUID matches */ private boolean acceptBasedOnUuid( AbstractNodeChange change ) { // JSR_283#12.5.3.4.2 return this.uuids == null || (!this.uuids.isEmpty() && this.uuids.contains(nodeIdentifier(change.getKey()))); }
/** * In case of changes involving locks from the system workspace, the TCK expects that the only property changes be for * lock owner and lock isDeep, which will be fired from the locked node. Therefore, we should exclude property * notifications from the lock node from the system workspace. * * @param nodeChange the internal event * @return true if the change should be accepted/propagated */ private boolean acceptIfLockChange( AbstractNodeChange nodeChange ) { if (!(nodeChange instanceof PropertyAdded || nodeChange instanceof PropertyRemoved || nodeChange instanceof PropertyChanged)) { return true; } Path path = nodeChange.getPath(); if (path.size() < 2) { return true; } Name firstSegmentName = path.subpath(0, 1).getLastSegment().getName(); boolean isSystemLockChange = JcrLexicon.SYSTEM.equals(firstSegmentName) && ModeShapeLexicon.LOCKS.equals(path.getParent().getLastSegment().getName()); return !isSystemLockChange; }
if (change instanceof AbstractPropertyChange) { parentNode = session.node(change.getKey(), null); } else { Path parentPath = parentNodePathOfChange(change);
/** * In case of changes involving locks from the system workspace, the TCK expects that the only property changes be for * lock owner and lock isDeep, which will be fired from the locked node. Therefore, we should exclude property * notifications from the lock node from the system workspace. * * @param nodeChange the internal event * @return true if the change should be accepted/propagated */ private boolean acceptIfLockChange( AbstractNodeChange nodeChange ) { if (!(nodeChange instanceof PropertyAdded || nodeChange instanceof PropertyRemoved || nodeChange instanceof PropertyChanged)) { return true; } Path path = nodeChange.getPath(); if (path.size() < 2) { return true; } Name firstSegmentName = path.subpath(0, 1).getLastSegment().getName(); boolean isSystemLockChange = JcrLexicon.SYSTEM.equals(firstSegmentName) && ModeShapeLexicon.LOCKS.equals(path.getParent().getLastSegment().getName()); return !isSystemLockChange; }
if (change instanceof AbstractPropertyChange) { parentNode = session.node(change.getKey(), null); } else { Path parentPath = parentNodePathOfChange(change);