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:
Britt Park
2006-09-20 13:54:53 +00:00
parent dda6d72701
commit 6f565e2be1
6 changed files with 55 additions and 2 deletions

View File

@@ -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.