* @see org.apache.lenya.cms.usecase.AbstractUsecase#getNodesToLock()
*/
protected org.apache.lenya.cms.repository.Node[] getNodesToLock() throws UsecaseException {
List nodes = new ArrayList();
ServiceSelector selector = null;
SiteManager siteManager = null;
try {
Publication publication = PublicationUtil.getPublicationFromUrl(this.manager,
getDocumentFactory(),
getSourceURL());
DocumentFactory identityMap = getDocumentFactory();
Document[] docs = getTrashDocuments();
for (int i = 0; i < docs.length; i++) {
nodes.add(docs[i].getRepositoryNode());
}
selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
SiteStructure structure = siteManager.getSiteStructure(identityMap,
publication,
Publication.TRASH_AREA);
nodes.add(structure.getRepositoryNode());
} catch (Exception e) {
throw new UsecaseException(e);