mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Change the behavior of AVMService.getAVMStore() and AVMService.lookup()
methods to return null for not found instead of throwing an exception. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,6 +20,7 @@ package org.alfresco.repo.avm;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
||||
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
||||
@@ -114,6 +115,10 @@ public class AVMSyncServiceImpl implements AVMSyncService
|
||||
public void resetLayer(String layerPath)
|
||||
{
|
||||
AVMNodeDescriptor desc = fAVMService.lookup(-1, layerPath);
|
||||
if (desc == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Not Found: " + layerPath);
|
||||
}
|
||||
String [] parts = AVMNodeConverter.SplitBase(layerPath);
|
||||
fAVMService.removeNode(parts[0], parts[1]);
|
||||
fAVMService.createLayeredDirectory(desc.getIndirection(), parts[0], parts[1]);
|
||||
|
Reference in New Issue
Block a user