public void restoreByLabel( String absPath, String versionLabel, boolean removeExisting) throws RepositoryException { try { manager.restoreByLabel(absPath, versionLabel, removeExisting); } catch (RepositoryException e) { throw getRepositoryException(e); } }
@Override public void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { getWrappedVersionManager().restoreByLabel(absPath, versionLabel, removeExisting); }
/** * Test calling Node.restoreByLabel(String, boolean) on a non-versionable node. * * @throws javax.jcr.RepositoryException * @see javax.jcr.Node#restoreByLabel(String, boolean) */ public void testRestoreByLabelNonVersionableNodeJcr2() throws RepositoryException { try { nonVersionableNode.getSession().getWorkspace().getVersionManager().restoreByLabel(nonVersionableNode.getPath(), versionLabel, true); fail("Node.restoreByLabel(String, boolean) on a non versionable node must throw UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException e) { //success } }
/** * Tests if <code>VersionHistory.restoreByLabel(String, boolean)</code> * throws an {@link javax.jcr.UnsupportedRepositoryOperationException} */ public void testRestoreByLabelJcr2() throws Exception { try { versionManager.restoreByLabel(vHistory.getPath(), "abc", true); fail("VersionHistory.restoreByLabel(String,boolean) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } }
/** * Test the restore of a versionable node using a label. * @throws RepositoryException */ public void testRestoreLabelJcr2() throws RepositoryException { // mark V1 with label test1 versionManager.getVersionHistory(versionableNode.getPath()).addVersionLabel(version.getName(), "test", true); // restore V1 via label. versionManager.restoreByLabel(versionableNode.getPath(), "test", true); String value = versionableNode.getProperty(propertyName1).getString(); assertEquals("Node.restore('test') not correctly restored", propertyValue1, value); }
/** * @see javax.jcr.Node#restoreByLabel(String, boolean) */ @Override public void restoreByLabel(String versionLabel, boolean removeExisting) throws RepositoryException { getVersionManager().restoreByLabel(getPath(), versionLabel, removeExisting); }
@Override public void restoreByLabel(final String absPath, final String versionLabel, final boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { try { workspace.postMountEnabled(false); versionManager.restoreByLabel(absPath, versionLabel, removeExisting); } finally { workspace.postMountEnabled(true); } }
/** * @see javax.jcr.Node#restoreByLabel(String, boolean) */ @Override public void restoreByLabel(String versionLabel, boolean removeExisting) throws RepositoryException { getVersionManager().restoreByLabel(getPath(), versionLabel, removeExisting); }
/** * @see javax.jcr.Node#restoreByLabel(String, boolean) */ @Override public void restoreByLabel(String versionLabel, boolean removeExisting) throws RepositoryException { getVersionManager().restoreByLabel(getPath(), versionLabel, removeExisting); }
/** * Test the restore of a versionable node using a label. * @throws RepositoryException */ public void testRestoreLabelJcr2() throws RepositoryException { // mark V1 with label test1 versionManager.getVersionHistory(versionableNode.getPath()).addVersionLabel(version.getName(), "test", true); // restore V1 via label. versionManager.restoreByLabel(versionableNode.getPath(), "test", true); String value = versionableNode.getProperty(propertyName1).getString(); assertEquals("Node.restore('test') not correctly restored", propertyValue1, value); }
/** * Tests if <code>Version.restoreByLabel(String, boolean)</code> throws an * {@link javax.jcr.UnsupportedRepositoryOperationException} */ public void testRestoreByLabelJcr2() throws Exception { try { versionManager.restoreByLabel(version.getPath(), "abc", true); fail("Version.restoreByLabel(String,boolean) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } }
public void restoreByLabel(String s, boolean b) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { registrySession.getWorkspace().getVersionManager().restoreByLabel(nodePath,s,true); }
vm.restoreByLabel(node.getPath(), "testLabel", true); utx.commit();