- Fixes and refinements to links management UI

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6082 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell 2007-06-24 20:44:12 +00:00
parent 0a849798aa
commit a5e73bf360

View File

@ -79,6 +79,7 @@ public class LinkValidationReport implements Serializable
this.completedAt = new Date();
this.numberFilesChecked = status.getFileUpdateCount();
this.numberLinksChecked = status.getUrlUpdateCount();
this.numberBrokenLinks = 0;
// create list and map
this.brokenFiles = new ArrayList<String>(manifests.size());
@ -109,6 +110,7 @@ public class LinkValidationReport implements Serializable
this.completedAt = new Date();
this.numberFilesChecked = status.getFileUpdateCount();
this.numberLinksChecked = status.getUrlUpdateCount();
this.numberBrokenLinks = 0;
// get the lists of broken files
List<HrefManifestEntry> byDelete = brokenByDelete.getManifestEntries();
@ -233,9 +235,14 @@ public class LinkValidationReport implements Serializable
for (HrefManifestEntry manifest : manifests)
{
String fileName = manifest.getFileName();
this.brokenFiles.add(fileName);
this.brokenLinksByFile.put(fileName, manifest);
this.numberBrokenLinks = this.numberBrokenLinks + manifest.getHrefs().size();
// make sure the same file only gets added once
if (this.brokenFiles.contains(fileName) == false)
{
this.brokenFiles.add(fileName);
this.brokenLinksByFile.put(fileName, manifest);
this.numberBrokenLinks = this.numberBrokenLinks + manifest.getHrefs().size();
}
}
}
}