mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-588: MT - delete tenant requires deleteStore
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -645,6 +645,28 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
return new Pair<Long, NodeRef>(rootNode.getId(), rootNode.getNodeRef());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveStore(StoreRef oldStoreRef, StoreRef newStoreRef)
|
||||
{
|
||||
StoreEntity store = getStoreNotNull(oldStoreRef);
|
||||
store.setProtocol(newStoreRef.getProtocol());
|
||||
store.setIdentifier(newStoreRef.getIdentifier());
|
||||
// Update it
|
||||
int count = updateStore(store);
|
||||
if (count != 1)
|
||||
{
|
||||
throw new ConcurrencyFailureException("Store not updated: " + oldStoreRef);
|
||||
}
|
||||
// All the NodeRef-based caches are invalid. ID-based caches are fine.
|
||||
rootNodesCache.removeByKey(oldStoreRef);
|
||||
nodesCache.clear();
|
||||
|
||||
if (isDebugEnabled)
|
||||
{
|
||||
logger.debug("Moved store: " + oldStoreRef + " --> " + newStoreRef);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to cache store root nodes by {@link StoreRef}.
|
||||
*
|
||||
@@ -3139,6 +3161,7 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
protected abstract NodeEntity selectStoreRootNode(StoreRef storeRef);
|
||||
protected abstract Long insertStore(StoreEntity store);
|
||||
protected abstract int updateStoreRoot(StoreEntity store);
|
||||
protected abstract int updateStore(StoreEntity store);
|
||||
protected abstract Long insertNode(NodeEntity node);
|
||||
protected abstract int updateNode(NodeUpdateEntity nodeUpdate);
|
||||
protected abstract int updateNodePatchAcl(NodeUpdateEntity nodeUpdate);
|
||||
|
Reference in New Issue
Block a user