// save to permanent file, if needed
if ("checkin".equals(reqType)) {
getLogger().debug(".act(): Save to permanent file: " + permFile);
RevisionController rc =
new RevisionController(
sitemapPath + rcmlDirectory,
sitemapPath + backupDirectory,
sitemapPath);
try {
Session session = httpReq.getSession(false);
if (session == null) {
throw new Exception("No session");
}
Identity identity = (Identity) session.getAttribute(Identity.class.getName());
org.apache.lenya.ac.Identity identityTwo =
(org.apache.lenya.ac.Identity) session.getAttribute(Identity.class.getName());
String username = null;
if (identity != null) {
User user = identity.getUser();
if (user != null) {
username = user.getId();
}
} else if (identityTwo != null) {
username = identityTwo.getUser().getId();
} else {
getLogger().error(".act(): No identity!");
}
getLogger().debug(".act(): Checkin: " + reqFile + "::" + username);
rc.reservedCheckIn(xmlRoot + reqFile, username, true);
FileUtils.copyFile(tempFile, permFile);
} catch (Exception e) {
getLogger().error(".act(): Exception during checkin of " + xmlRoot + reqFile, e);
return null;
}