SiteStructure liveSite = publication.getArea(Publication.LIVE_AREA).getSite();
List missingDocuments = new ArrayList();
ServiceSelector selector = null;
SiteManager siteManager = null;
try {
selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
if (!liveSite.contains(document.getPath())) {
DocumentLocator liveLoc = document.getLocator().getAreaVersion(
Publication.LIVE_AREA);
DocumentLocator[] requiredNodes = siteManager
.getRequiredResources(map, liveLoc);
for (int i = 0; i < requiredNodes.length; i++) {
String path = requiredNodes[i].getPath();
if (!liveSite.contains(path)) {
Link link = getExistingLink(path, document);