* @see org.apache.lenya.cms.publication.DocumentManager#copyAll(org.apache.lenya.cms.publication.Document,
* org.apache.lenya.cms.publication.Document)
*/
public void copyAll(Document source, Document target) throws PublicationException {
SiteManager siteManager = null;
ServiceSelector selector = null;
try {
selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
siteManager = (SiteManager) selector.select(source.getPublication()
.getSiteManagerHint());
Document[] descendantsArray = siteManager.getRequiringResources(source);
DocumentSet descendants = new DocumentSet(descendantsArray);
descendants.add(source);
siteManager.sortAscending(descendants);
DocumentVisitor visitor = new CopyVisitor(this, source, target);
descendants.visit(visitor);
} catch (ServiceException e) {
throw new PublicationException(e);