// a future attempt to put the node under version control again
// (see JCR-3115)
log.info("trying to rename version history of node " + node.getId());
NameFactory nf = NameFactoryImpl.getInstance();
// Name of VHR in parent folder is ID of versionable node
Name vhrname = nf.create(Name.NS_DEFAULT_URI, node.getId().toString());
try {
NodeState vhrState = versionManager.getPersistenceManager().load(vhid);
NodeState vhrParentState = versionManager.getPersistenceManager().load(vhrState.getParentId());
if (vhrParentState.hasChildNodeEntry(vhrname)) {
NodeState modifiedParent = (NodeState) vworkspaceChanges.get(vhrState.getParentId());
if (modifiedParent == null) {
modifiedParent = new NodeState(vhrParentState, NodeState.STATUS_EXISTING_MODIFIED, true);
}
Calendar now = Calendar.getInstance();
String appendme = " (disconnected by RepositoryChecker on "
+ ISO8601.format(now) + ")";
modifiedParent.renameChildNodeEntry(vhid,
nf.create(vhrname.getNamespaceURI(), vhrname.getLocalName() + appendme));
vworkspaceChanges.modified(modifiedParent);
}
else {
log.info("child node entry " + vhrname + " for version history not found inside parent folder.");