public String getName() { try { return item.getName(); } catch (RepositoryException e) { return ""; } } }
/** {@inheritDoc} */ public String getName() throws RepositoryException { return item.getName(); }
/** * Returns <code>true</code> if the name of the given item is equal to * the configured name. * @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item) */ @Override protected boolean matches(Item item) throws RepositoryException { return item.getName().equals(name); } }
/** * Returns <code>true</code> if the name of the given item is equal to * the configured name. * @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item) */ @Override protected boolean matches(Item item) throws RepositoryException { return item.getName().equals(name); } }
/** * Returns <code>true</code> if the name of the given item is equal to * the configured name. * @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item) */ @Override protected boolean matches(Item item) throws RepositoryException { return item.getName().equals(name); } }
public boolean isSame(Item item) throws RepositoryException { boolean isSame = false; if (name.equals(item.getName())) { isSame = true; } return isSame; }
/** * Returns <code>true</code> if the name of the given item is equal to * the configured name. * @see org.apache.jackrabbit.commons.predicate.DepthPredicate#matches(javax.jcr.Item) */ protected boolean matches(Item item) throws RepositoryException { return item.getName().equals(name); } }
/** * {@inheritDoc} * * Returns {@code true} if the name of the given item is equal to * the configured name. */ public boolean matches(Item item) throws RepositoryException { return item.getName().equals(name); }
@Override public boolean accept(final Item item) throws RepositoryException { return (item instanceof Property) && pattern.matcher(item.getName()).matches(); } });
@Override public boolean accept(final Item item) throws RepositoryException { return (item instanceof Node) && pattern.matcher(item.getName()).matches(); } });
/** {@inheritDoc} */ public String getName() throws RepositoryException, RemoteException { try { return item.getName(); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public boolean accept(Item item) throws RepositoryException { String name = item.getName(); // boolean result = false; for (int i = 0; i < expressions.size(); i++) { String expr = (String)expressions.get(i); if (estimate(name, expr)) return true; } return false; }
private void addTemplate(JcrItemModel model) throws RepositoryException { Item item = (Item) model.getObject(); String name = item.getName(); Set<String> excluded = descriptor.getExcluded(); if (excluded == null || !excluded.contains(name)) { elements.addLast(new JcrNodeModel(model)); } } }
/** * * @param item * @return */ private boolean isFilteredNamespace(Item item) { try { return isFilteredNamespace(item.getName(), item.getSession()); } catch (RepositoryException e) { log.warn(e.getMessage()); } return false; }
private static void eraseDocument(final String uuid, final FolderWorkflow folderWorkflow, final Item handle) throws InternalServerErrorException, NotFoundException, MethodNotAllowed { try { log.info("Erasing document '{}'", uuid); folderWorkflow.delete(handle.getName()); } catch (WorkflowException | RepositoryException | RemoteException e) { log.warn("Failed to erase document '{}'", uuid, e); throw new InternalServerErrorException(new ErrorInfo(Reason.SERVER_ERROR)); } }
@Test public void testGetJcrItemIsEscaped() throws Exception { // GIVEN ContentDecorator decorator = new HTMLEscapingContentDecorator(false); JcrNodeAdapter nodeAdapter = mock(JcrNodeAdapter.class); when(nodeAdapter.getJcrItem()).thenReturn(node); when(nodeAdapter.isNode()).thenReturn(true); when(table.getItem(itemId)).thenReturn(nodeAdapter); // WHEN javax.jcr.Item value = abstractColumnFormatter.getJcrItem(table, itemId); // THEN assertThat(decorator.wrapNode(node).getName(), is(value.getName())); }