public Object run() throws RepositoryException { vMgr.removeActivity(getNode(activityId, sInfo)); return null; } }, getSessionInfoImpl(sessionInfo));
public Object run() throws RepositoryException { vMgr.removeActivity(getNode(activityId, sInfo)); return null; } }, getSessionInfoImpl(sessionInfo));
@Override public void removeActivity(final Node activityNode) throws UnsupportedRepositoryOperationException, VersionException, RepositoryException { versionManager.removeActivity(activityNode); }
@Override public void removeActivity(Node activityNode) throws UnsupportedRepositoryOperationException, VersionException, RepositoryException { getWrappedVersionManager().removeActivity(activityNode); }
protected void tearDown() throws Exception { if (activityNode != null) { superuser.getWorkspace().getVersionManager().removeActivity(activityNode); activityNode = null; } super.tearDown(); }
@Override public void removeActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException { try { Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); manager.removeActivity(activityNode); } catch (RepositoryException e) { throw getRepositoryException(e); } }
public void testActivitiesPath() throws Exception { Node an = null; try { an = vm.createActivity("foobar"); assertNotNull(an); NodeType annt = an.getPrimaryNodeType(); assertTrue("create node must be subtype of nt:activity", annt.isNodeType("nt:activity")); assertTrue("path for activity must be below " + PREFIX + ", but was " + an.getPath(), an.getPath().startsWith(PREFIX)); Node activities = superuser.getNode(PREFIX); try { activities.addNode("foobar"); fail("/jcr:system/jcr:activities must be protected."); } catch (RepositoryException e) { // ok } } finally { if (an != null) { vm.removeActivity(an); } } }
public void testCreateRemoveActivity() throws Exception { Node an = null; try { an = vm.createActivity("foobar"); assertNotNull(an); NodeType annt = an.getPrimaryNodeType(); assertTrue("create node must be subtype of nt:activity", annt.isNodeType("nt:activity")); } finally { if (an != null) { vm.removeActivity(an); } } }
public void testSetGetActivity() throws Exception { Node an = null; try { an = vm.createActivity("foobar"); assertNotNull(an); assertNull(vm.getActivity()); Node old = vm.setActivity(an); assertNull(old); assertEquals(an.getPath(), vm.getActivity().getPath()); old = vm.setActivity(null); assertEquals(old.getPath(), an.getPath()); assertNull(vm.getActivity()); } finally { if (an != null) { vm.removeActivity(an); } } }
public void testActivitiesRelationWithCheckpoint() throws Exception { Node an = null; try { an = vm.createActivity("foobar2"); vm.setActivity(an); String path = versionableNode.getPath(); vm.checkpoint(path); versionableNode = superuser.getNode(path); Property act = versionableNode.getProperty(Property.JCR_ACTIVITY); assertNotNull(act); assertEquals(PropertyType.REFERENCE, act.getType()); assertTrue(act.getNode().isSame(an)); versionableNode.remove(); superuser.save(); } finally { if (an != null) { vm.removeActivity(an); } } } }