/** * Returns the name of the property. * * @return the name of the property. * @deprecated use {@link #getPropertyPath()} instead. */ public Name getProperty() { return property.getName(); }
/** * {@inheritDoc} */ public Name getName() { return path.getName(); }
/** * Returns the name of the property. * * @return the name of the property. * @deprecated use {@link #getPropertyPath()} instead. */ public Name getProperty() { return property.getName(); }
/** * {@inheritDoc} */ public Name getName() { return path.getName(); }
/** * Returns a property name if the scope is limited to just a single property * or <code>null</code> if the scope is spawned across all properties of a * node. Please note that this method does not return the full relative path * that reference the item to match, but only the name of the final name * element of the path returned by {@link #getRelativePath()}. * * @return property name or <code>null</code>. * @deprecated Use {@link #getRelativePath()} instead. */ public Name getPropertyName() { return relPath == null ? null : relPath.getName(); }
/** * Returns a property name if the scope is limited to just a single property * or <code>null</code> if the scope is spawned across all properties of a * node. Please note that this method does not return the full relative path * that reference the item to match, but only the name of the final name * element of the path returned by {@link #getRelativePath()}. * * @return property name or <code>null</code>. * @deprecated Use {@link #getRelativePath()} instead. */ public Name getPropertyName() { return relPath == null ? null : relPath.getName(); }
PropertyInclude(Path pattern) throws RepositoryException { super(pattern.getAncestor(1), null); this.propertyName = pattern.getName(); }
PropertyInclude(Path pattern) throws RepositoryException { super(pattern.getAncestor(1), null); this.propertyName = pattern.getName(); }
public Name getName() { return getPath().getName(); }
public Name getName() { return getPath().getName(); }
/** * {@inheritDoc} */ public void writePathElement(Path path) throws JournalException { writeQName(path.getName()); writeInt(path.getIndex()); }
/** * {@inheritDoc} */ public void writePathElement(Path path) throws JournalException { writeQName(path.getName()); writeInt(path.getIndex()); }
@Override public final boolean equals(Object that) { if (this == that) { return true; } else if (that instanceof Path) { Path path = (Path) that; return path.denotesName() && name.equals(path.getName()) && getNormalizedIndex() == path.getNormalizedIndex() && super.equals(that); } else { return false; } }
@Override public final boolean equals(Object that) { if (this == that) { return true; } else if (that instanceof Path) { Path path = (Path) that; return path.denotesName() && name.equals(path.getName()) && getNormalizedIndex() == path.getNormalizedIndex() && super.equals(that); } else { return false; } }
public static Operation create( NodeState parentState, Path srcPath, Path beforePath) throws ItemNotFoundException, RepositoryException { // make sure the parent hierarchy entry has its child entries loaded assertChildNodeEntries(parentState); NodeState insert = parentState.getChildNodeState( srcPath.getName(), srcPath.getNormalizedIndex()); NodeState before = null; if (beforePath != null) { before = parentState.getChildNodeState( beforePath.getName(), beforePath.getNormalizedIndex()); } return new ReorderNodes(parentState, insert, before); } }
@Override public NodeIterator findNodes(Path relPath, String value, int authorizableType, boolean exact, long maxSize) throws RepositoryException { Query query; if (relPath.getLength() == 1) { Set<Name> names = Collections.singleton(relPath.getName()); // search without nt-restriction in order not to limit the query to the // authorizable nodes and filter non-matching results later. query = buildQuery(value, names, null, exact, maxSize, getSearchRoot(authorizableType)); } else { query = buildQuery(value, relPath, exact, maxSize, getSearchRoot(authorizableType)); } return new ResultFilteringNodeIterator(query.execute().getNodes(), getAuthorizableTypePredicate(authorizableType, false)); }
@Override public NodeIterator findNodes(Path relPath, String value, int authorizableType, boolean exact, long maxSize) throws RepositoryException { Query query; if (relPath.getLength() == 1) { Set<Name> names = Collections.singleton(relPath.getName()); // search without nt-restriction in order not to limit the query to the // authorizable nodes and filter non-matching results later. query = buildQuery(value, names, null, exact, maxSize, getSearchRoot(authorizableType)); } else { query = buildQuery(value, relPath, exact, maxSize, getSearchRoot(authorizableType)); } return new ResultFilteringNodeIterator(query.execute().getNodes(), getAuthorizableTypePredicate(authorizableType, false)); }
/** * Returns <code>true</code> if the item corresponding to the specified * <code>eventState</code> can be read the the current session. * * @param eventState * @return * @throws RepositoryException */ private boolean canRead(EventState eventState) throws RepositoryException { Path targetPath = pathFactory.create(eventState.getParentPath(), eventState.getChildRelPath().getName(), eventState.getChildRelPath().getNormalizedIndex(), true); return session.getAccessManager().isGranted(targetPath, Permission.READ); } }
/** * Returns <code>true</code> if the item corresponding to the specified * <code>eventState</code> can be read the the current session. * * @param eventState * @return * @throws RepositoryException */ private boolean canRead(EventState eventState) throws RepositoryException { Path targetPath = pathFactory.create(eventState.getParentPath(), eventState.getChildRelPath().getName(), eventState.getChildRelPath().getNormalizedIndex(), true); return session.getAccessManager().isGranted(targetPath, Permission.READ); } }
private void assertProperDepthExtensionHandling(String path, String name, boolean create) throws RepositoryException { Name testName = resolver.getQName(name); if (create) { createTestNode(path); testPath = path; } NodeInfo nInfo = rs.getNodeInfo(si, getNodeId(path)); //System.out.println("NodeInfo: " + nInfo.getPath().getNameElement().getName()); assertEquals(testName, nInfo.getPath().getName()); Iterator<? extends ItemInfo > it = rs.getItemInfos(si, getNodeId(path)); assertTrue(it.hasNext()); nInfo = (NodeInfo) it.next(); //System.out.println("ItemInfo: " + nInfo.getPath().getNameElement().getName()); assertEquals(testName, nInfo.getPath().getName()); }