Added utility method to get a path for an AVM node as quickly as possible. Switched history

viewing to use it.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4944 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-01-26 16:34:36 +00:00
parent 2384aba9bc
commit 6b90400de1

View File

@@ -158,11 +158,9 @@ public class FileDetailsBean extends AVMDetailsBean
wrapper.put("version", record.getVersionID());
wrapper.put("strVersion", Integer.toString(record.getVersionID()));
wrapper.put("modifiedDate", new Date(record.getModDate()));
List<Pair<Integer, String>> paths = this.avmService.getPaths(record);
if (paths.size() != 0)
Pair<Integer, String> path = this.avmService.getAPath(record);
if (path != null)
{
// display the first path as any will show the same content
Pair<Integer, String> path = paths.get(0);
wrapper.put("url", DownloadContentServlet.generateBrowserURL(
AVMNodeConverter.ToNodeRef(path.getFirst(), path.getSecond()), avmNode.getName()));
}