/** {@inheritDoc} */ public int getDepth() throws RepositoryException { return item.getDepth(); }
@Override public int getDepth() throws RepositoryException { return delegate.getDepth(); }
public int getDepth() throws RepositoryException { return this.item.getDepth(); }
/** {@inheritDoc} */ public int getDepth() throws RepositoryException, RemoteException { try { return item.getDepth(); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public Integer execute() throws Exception { return getDelegate().getDepth(); } });
public int getDepth() throws RepositoryException { return getDelegate().getDepth(); }
/** * Matches if the given depth is greater or equal the minimum depth and * less or equal the maximum depth and if the call to {@link #matches(Item)} * returns <code>true</code>. * @see Predicate#evaluate(java.lang.Object) */ public boolean evaluate(Object item) { if ( item instanceof Item ) { try { final int depth = ((Item)item).getDepth(); return depth >= minDepth && depth <= maxDepth && matches((Item)item); } catch (RepositoryException re) { return false; } } return false; }
/** * Matches if the given depth is greater or equal the minimum depth and * less or equal the maximum depth and if the call to {@link #matches(Item)} * returns <code>true</code>. * @see org.apache.commons.collections.Predicate#evaluate(java.lang.Object) */ public boolean evaluate(Object item) { if ( item instanceof Item ) { try { final int depth = ((Item)item).getDepth(); return depth >= minDepth && depth <= maxDepth && matches((Item)item); } catch (RepositoryException re) { return false; } } return false; }
/** * Matches if the given depth is greater or equal the minimum depth and * less or equal the maximum depth and if the call to {@link #matches(Item)} * returns <code>true</code>. * @see Predicate#evaluate(java.lang.Object) */ public boolean evaluate(Object item) { if ( item instanceof Item ) { try { final int depth = ((Item)item).getDepth(); return depth >= minDepth && depth <= maxDepth && matches((Item)item); } catch (RepositoryException re) { return false; } } return false; }
/** * Matches if the given depth is greater or equal the minimum depth and * less or equal the maximum depth and if the call to {@link #matches(Item)} * returns <code>true</code>. * @see Predicate#evaluate(java.lang.Object) */ public boolean evaluate(Object item) { if ( item instanceof Item ) { try { final int depth = ((Item)item).getDepth(); return depth >= minDepth && depth <= maxDepth && matches((Item)item); } catch (RepositoryException re) { return false; } } return false; }
if(origin.getDepth() > 0 && origin.getParent().isNodeType("mix:versionable")) { if (!origin.getParent().isCheckedOut()) { origin.getParent().checkout();
@Override protected void initPropertyNames() { super.initPropertyNames(); if (exists()) { names.addAll(JcrDavPropertyNameSet.EXISTING_ITEM_BASE_SET); try { if (item.getDepth() > 0) { names.add(JCR_PARENT); } } catch (RepositoryException e) { log.warn("Error while accessing node depth: " + e.getMessage()); } if (item.isNew()) { names.add(JCR_ISNEW); } else if (item.isModified()) { names.add(JCR_ISMODIFIED); } } else { names.addAll(JcrDavPropertyNameSet.ITEM_BASE_SET); } }
/** * Fill the property set for this resource. */ @Override protected void initProperties() { super.initProperties(); if (exists()) { try { properties.add(new DefaultDavProperty<String>(JCR_NAME, item.getName())); properties.add(new DefaultDavProperty<String>(JCR_PATH, item.getPath())); int depth = item.getDepth(); properties.add(new DefaultDavProperty<String>(JCR_DEPTH, String.valueOf(depth))); // add href-property for the items parent unless its the root item if (depth > 0) { String parentHref = getLocatorFromItem(item.getParent()).getHref(true); properties.add(new HrefProperty(JCR_PARENT, parentHref, false)); } } catch (RepositoryException e) { // should not get here log.error("Error while accessing jcr properties: " + e.getMessage()); } } }
private void checkHierarchy() throws PathNotFoundException, RepositoryException, ItemNotFoundException, AccessDeniedException { for (Iterator<ItemInfo> itemInfos = itemInfoStore.getItemInfos(); itemInfos.hasNext();) { ItemInfo itemInfo = itemInfos.next(); String jcrPath = toJCRPath(itemInfo.getPath()); Item item = session.getItem(jcrPath); assertEquals(jcrPath, item.getPath()); if (item.getDepth() > 0) { Node parent = item.getParent(); if (item.isNode()) { assertTrue(item.isSame(parent.getNode(item.getName()))); } else { assertTrue(item.isSame(parent.getProperty(item.getName()))); } } } }