mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added removeNode(String path) to AVMService as a convenience and to
reduce my shame. Beefed up path robustness in AVMNodeConverter.SplitBase(). Removed an unneeded import from AVMNodeService. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -384,6 +384,24 @@ public class AVMServiceImpl implements AVMService
|
||||
}
|
||||
fAVMRepository.remove(parent, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a node by full path.
|
||||
* @param path The full path to the node.
|
||||
*/
|
||||
public void removeNode(String path)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Illegal null argument.");
|
||||
}
|
||||
String [] basePath = AVMNodeConverter.SplitBase(path);
|
||||
if (basePath[0] == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Cannot remove root node.");
|
||||
}
|
||||
fAVMRepository.remove(basePath[0], basePath[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename a node.
|
||||
|
Reference in New Issue
Block a user