protected void reportBrokenLinks() throws Exception {
List brokenLinks = new ArrayList();
Publication pub = getPublication();
String[] areaNames = pub.getAreaNames();
LinkManager linkManager = null;
LinkResolver linkResolver = null;
try {
linkManager = (LinkManager) this.manager.lookup(LinkManager.ROLE);
linkResolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
for (int a = 0; a < areaNames.length; a++) {
Area area = pub.getArea(areaNames[a]);
Document[] docs = area.getDocuments();
for (int d = 0; d < docs.length; d++) {
Link[] links = linkManager.getLinksFrom(docs[d]);
for (int l = 0; l < links.length; l++) {
String uri = links[l].getUri();
LinkTarget target = linkResolver.resolve(docs[d], uri);
if (!target.exists()) {
BrokenLink brokenLink = new BrokenLink(docs[d].getCanonicalWebappURL(), uri);