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:
Britt Park
2006-09-13 14:54:25 +00:00
parent a06fc74aef
commit 194d96082c
8 changed files with 91 additions and 76 deletions

View File

@@ -148,6 +148,10 @@ public class AVMInterpreter
}
AVMNodeDescriptor desc = fService.lookup(Integer.parseInt(command[2]),
command[1]);
if (desc == null)
{
return "Not Found.";
}
Map<String, AVMNodeDescriptor> listing =
fService.getDirectoryListing(desc);
for (String name : listing.keySet())
@@ -424,6 +428,10 @@ public class AVMInterpreter
return "Syntax Error.";
}
AVMStoreDescriptor desc = fService.getAVMStore(command[1]);
if (desc == null)
{
return "Not Found.";
}
out.println(desc);
Map<QName, PropertyValue> props =
fService.getStoreProperties(command[1]);