public Void execute() { if (storeRef != null) { nodeService.deleteStore(storeRef); } return null; } });
@After public void after() { nodeService.deleteStore(testStoreRef); }
try nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_SPACES), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_ARCHIVE, STORE_BASE_ID_SPACES), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_VERSION1), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_VERSION2), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_SYSTEM, STORE_BASE_ID_SYSTEM), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_USER, STORE_BASE_ID_USER), tenantDomain, false));
try nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_SPACES), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_ARCHIVE, STORE_BASE_ID_SPACES), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_VERSION1), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_WORKSPACE, STORE_BASE_ID_VERSION2), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_SYSTEM, STORE_BASE_ID_SYSTEM), tenantDomain, false)); nodeService.deleteStore(tenantService.getName(new StoreRef(PROTOCOL_STORE_USER, STORE_BASE_ID_USER), tenantDomain, false));
@Override public Object execute() throws Throwable { // As system user AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName()); if (useSpacesStore() == false) { // Delete the created store nodeService.deleteStore(storeRef); } return null; } });
@AfterClass public static void tearDownAfterClass() throws Exception { AuthenticationUtil.setRunAsUserSystem(); System.out.println(NodeStoreInspector.dumpNodeStore(nodeService, storeRef)); nodeService.deleteStore(storeRef); try { authenticationComponent.clearCurrentSecurityContext(); } catch (Throwable e) { // ignore } properties = null; auditor = null; }
nodeService.deleteStore(storeRef);
assertTrue("Node should still exist", nodeService.exists(rootNodeRef)); nodeService.deleteStore(storeRef); storeRefs = nodeService.getStores(); assertFalse("Deleted store should not present in list of stores", storeRefs.contains(storeRef));