rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
String backupDirectory = rcEnvironment.getBackupDirectory();
backupDirectory = publicationPath + File.separator + backupDirectory;
// Initialize Revision Controller
RevisionController rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);
selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
siteManager = (SiteManager) selector.select(_publication.getSiteManagerHint());
Document[] documents = siteManager.getDocuments(getDocumentIdentityMap(),_publication,this.getArea());
selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");
docBuilder = (DocumentBuilder) selector.select(_publication.getDocumentBuilderHint());
for(int i=0; i< documents.length; i++) {
String test = documents[i].getCanonicalWebappURL().replaceFirst("/[^/]*.html","");
if(!test.endsWith("/"))
test = test+"/";
if(test.equals(request)){
docs.add(documents[i]);
String filename = documents[i].getFile().getCanonicalPath();
filename = filename.substring(publicationPath.length());
RCMLEntry entry = rc.getRCML(filename).getLatestEntry();
if ((entry != null) && (entry.getType() == RCML.co) )
checkedOut.add(entry);
else
checkedOut.add(null);
//get additional language documents
String[] langs = documents[i].getLanguages();
for(int j=0; j< langs.length; j++) {
if(!(langs[j].equals(documents[i].getLanguage()))) {
String url = documents[i].getCanonicalWebappURL().replaceFirst(".html$","_"+langs[j]+".html");
Document langDoc = docBuilder.buildDocument(documents[i].getIdentityMap(),_publication,url);
docs.add(langDoc);
filename = langDoc.getFile().getCanonicalPath();
filename = filename.substring(publicationPath.length());
entry = rc.getRCML(filename).getLatestEntry();
if ((entry != null) && (entry.getType() == RCML.co) )
checkedOut.add(entry);
else
checkedOut.add(null);
}