try {
WorkspaceCache cache = repository.repositoryCache().getWorkspaceCache(workspaceName);
AllPathsCache allPathsCache = new AllPathsCache(cache, null, pathFactory);
CachedNode node = cache.getNode(projectedKey);
for (Path nodePath : allPathsCache.getPaths(node)) {
Path internalPath = pathFactory.create(nodePath, alias);
// Then find the path(s) for the external node with the aforementioned key ...
for (String externalPathStr : conn.getDocumentPathsById(externalDocId)) {
Path externalPath = pathFactory.create(externalPathStr);
mappings.add(externalPath, internalPath, workspaceName);
}