/** {@inheritDoc} */ public void remove() throws VersionException, LockException, RepositoryException { item.remove(); }
/** * Removes the identified item. Implemented by calling * {@link Item#remove()} on the item removed by {@link #getItem(String)}. * * @see Session#removeItem(String) * @param absPath An absolute path of the item to be removed * @throws RepositoryException if the item can not be removed */ public void removeItem(String absPath) throws RepositoryException { getItem(absPath).remove(); }
/** * Removes the identified item. Implemented by calling * {@link Item#remove()} on the item removed by {@link #getItem(String)}. * * @see Session#removeItem(String) * @param absPath An absolute path of the item to be removed * @throws RepositoryException if the item can not be removed */ public void removeItem(String absPath) throws RepositoryException { getItem(absPath).remove(); }
/** {@inheritDoc} */ public void remove() throws RepositoryException, RemoteException { try { item.remove(); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public void remove() throws JcrDiffException { try { jcrItem.remove(); } catch (RepositoryException e) { throw new JcrDiffException("Could not remove tree item", e); } }
/** * Removes the identified item. Implemented by calling * {@link Item#remove()} on the item removed by {@link #getItem(String)}. * * @see Session#removeItem(String) * @param absPath An absolute path of the item to be removed * @throws RepositoryException if the item can not be removed */ public void removeItem(String absPath) throws RepositoryException { getItem(absPath).remove(); }
/** * @see Session#removeItem(String) */ @Override public void removeItem(String absPath) throws RepositoryException { Item item = getItem(absPath); item.remove(); }
/** * @see Session#removeItem(String) */ @Override public void removeItem(String absPath) throws RepositoryException { Item item = getItem(absPath); item.remove(); }
public void remove() throws RepositoryException { // handler is notified from subclasses getDelegate().remove(); } }
public Object doInJcr( final Session session ) throws RepositoryException { Item item; try { item = session.getItem( absPath ); } catch ( PathNotFoundException e ) { return null; } item.remove(); session.save(); return null; } } );
protected void doDelete( String path, Session session ) throws RepositoryException { Item item; try { item = session.getItem(path); } catch (PathNotFoundException pnfe) { throw new NotFoundException(pnfe.getMessage(), pnfe); } item.remove(); }
public boolean execute(Context context) throws Exception { Session session = ((JCRAppContext)context).getSession(); session.getItem((String)context.get(pathKey)).remove(); return true; }
@Override public boolean execute(Context ctx) throws Exception { log.debug("Going to remove item [{}].", getPath()); Item jcrItem = MgnlContext.getJCRSession(this.getRepository()).getItem(getPath()); jcrItem.remove(); jcrItem.getSession().save(); return true; }
/** * Test if a node, that has been transiently removed is not 'New'. */ public void testNotNewRemovedItem() throws RepositoryException { removeItem.remove(); assertFalse("Transiently removed node must not be 'new'.", removeItem.isNew()); }
public void remove(String path) { try { if (!session.nodeExists(path)) { throw new ObjectContentManagerException("Path does not exist : " + path); } else { checkIfNodeLocked(path); } Item item = session.getItem(path); item.remove(); } catch (RepositoryException e) { throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to remove the object at " + path); } }
/** * Test if a node, that has be transiently remove is not 'Modified'. */ public void testNotModifiedRemovedItem() throws RepositoryException { removeItem.remove(); assertFalse("Transiently removed node must not be 'modified'.", removeItem.isModified()); }
/** * Same as {@link #testNotModifiedRemovedItem()} but calls save() before * executing the test. */ public void testNotModifiedRemovedItem2() throws RepositoryException { removeItem.remove(); testRootNode.save(); assertFalse("Removed node must not be 'modified'.", removeItem.isModified()); }
public void removeItem(String path) throws RepositoryException { Item item = getSession().getItem(path); if (item.isNode()) { new NodeProxy((Node) item).remove(); } else { item.remove(); processChanges(Text.getRelativeParent(path, 1), path); } }
/** * Same as {@link #testNotNewRemovedItem()} but calls save() before * executing the test. */ public void testNotNewRemovedItem2() throws RepositoryException { removeItem.remove(); testRootNode.save(); assertFalse("Removed node must not be 'new'.", removeItem.isNew()); }
public void testRevert() throws RepositoryException { String srcPath = moveNode.getPath(); doMove(srcPath, destinationPath); // now remove the moved node testRootNode.getSession().getItem(destinationPath).remove(); testRootNode.refresh(false); assertTrue(superuser.itemExists(srcPath)); assertFalse(superuser.itemExists(destinationPath)); assertFalse(moveNode.isModified()); assertFalse(destParentNode.isModified()); assertFalse(srcParentNode.isModified()); }