try
{
for (int i = 0; i < list.length; i++)
{
PlainChangesLog plainChangesLog =
new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);
NodeData lockedNodeData = (NodeData)dataManager.getItemData(list[i]);
// No item no problem
if (lockedNodeData != null)
{
PropertyData dataLockIsDeep =
(PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
ItemType.PROPERTY);
if (dataLockIsDeep != null)
{
plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
lockedNodeData.getQPath(), Constants.JCR_LOCKISDEEP), dataLockIsDeep.getIdentifier(), 0,
dataLockIsDeep.getType(), dataLockIsDeep.getParentIdentifier(), dataLockIsDeep.isMultiValued())));
}
PropertyData dataLockOwner =
(PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
ItemType.PROPERTY);
if (dataLockOwner != null)
{
plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
lockedNodeData.getQPath(), Constants.JCR_LOCKOWNER), dataLockOwner.getIdentifier(), 0,
dataLockOwner.getType(), dataLockOwner.getParentIdentifier(), dataLockOwner.isMultiValued())));
}
if (plainChangesLog.getSize() > 0)
{
transactionChangesLog.addLog(plainChangesLog);
}
}
}