protected void doExecute() throws Exception {
super.doExecute();
String pubId = getParameterAsString(PUBLICATION);
DocumentFactory factory = getDocumentFactory();
ServiceSelector selector = null;
SiteManager siteManager = null;
SourceResolver resolver = null;
try {
resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
Publication pub = factory.getPublication(pubId);
selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
List nodes = new ArrayList();
Map uri2meta = new HashMap();
String[] areas = { Publication.AUTHORING_AREA, Publication.LIVE_AREA,
Publication.TRASH_AREA, Publication.ARCHIVE_AREA };
for (int i = 0; i < areas.length; i++) {
Document[] docs = siteManager.getDocuments(factory, pub, areas[i]);
for (int j = 0; j < docs.length; j++) {
nodes.add(docs[j].getRepositoryNode());
/*
final String lenyaUri = docs[j].getSourceURI();
final String sourcePath = lenyaUri.substring("lenya://".length());
final String contextUri = "context://" + sourcePath + ".meta";
* MetaDataManager meta = new MetaDataManager(contextUri, this.manager,
* getLogger()); uri2meta.put(docs[j].getSourceURI(), meta);
*/
}
nodes.add(siteManager.getSiteStructure(factory, pub, areas[i]).getRepositoryNode());
}
for (Iterator i = nodes.iterator(); i.hasNext();) {
Node node = (Node) i.next();
final String lenyaUri = node.getSourceURI();